It is currently Thu Apr 02, 2020 11:34 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 30 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: [Module] ButtonEx (all OS)
PostPosted: Tue Jul 30, 2019 11:32 am 
Online
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1201
Location: Germany
Update:
  • Bugfixes
  • Support of #LF$ for multiline - buttons

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] ButtonEx (all OS)
PostPosted: Wed Jul 31, 2019 2:35 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Mar 27, 2009 9:41 am
Posts: 748
Location: Athens, Greece
Set text to #BUTTONML to "Nokia Phone" and after line
Code:
Debug "Multiline button pressed"
add:
Code:
ButtonEx::SetText(#ButtonML, ButtonEx::GetText(#ButtonML) + #LF$ + "5")
and see that the text goes on the top of the button and not in the middle. (SetText() and GetText() are in my last post with your code.)


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] ButtonEx (all OS)
PostPosted: Wed Jul 31, 2019 9:44 pm 
Online
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1201
Location: Germany
Bug fixed

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] ButtonEx (all OS)
PostPosted: Tue Sep 03, 2019 5:26 pm 
Online
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1201
Location: Germany
Update: dynamic text size (needs ModuleEx.pbi)

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] ButtonEx (all OS)
PostPosted: Sun Nov 17, 2019 4:18 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon Jun 23, 2014 1:18 pm
Posts: 180
Line 64: XIncludeFile "ModuleEx.pbi"


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] ButtonEx (all OS)
PostPosted: Sun Nov 17, 2019 4:19 pm 
Online
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1201
Location: Germany
Fixed

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] ButtonEx (all OS)
PostPosted: Wed Nov 20, 2019 8:14 am 
Offline
Enthusiast
Enthusiast

Joined: Mon Jun 23, 2014 1:18 pm
Posts: 180
Yes... looks great :)

Next "problem"... the popupmenu is not really in place.
My Button is 120px. the arrow-button is at the right side. The popup shows on the left side.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] ButtonEx (all OS)
PostPosted: Wed Nov 20, 2019 2:57 pm 
Online
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1201
Location: Germany
Cyllceaux wrote:
Yes... looks great :)

Next "problem"... the popupmenu is not really in place.
My Button is 120px. the arrow-button is at the right side. The popup shows on the left side.

I still haven't found a way to determine the width of the popup menu to position it right-aligned.

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] ButtonEx (all OS)
PostPosted: Wed Nov 20, 2019 3:05 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon Jun 23, 2014 1:18 pm
Posts: 180
Thorsten1867 wrote:
Cyllceaux wrote:
Yes... looks great :)

Next "problem"... the popupmenu is not really in place.
My Button is 120px. the arrow-button is at the right side. The popup shows on the left side.

I still haven't found a way to determine the width of the popup menu to position it right-aligned.


Maybe line 682 to:
Code:
DisplayPopupMenu(BtEx()\PopupNum, WindowID(BtEx()\Window\Num), dpiX(dX)+GadgetWidth(BtEx()\CanvasNum)-dpiy(20), dpiY(dY))


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] ButtonEx (all OS)
PostPosted: Wed Nov 20, 2019 4:15 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon Jun 23, 2014 1:18 pm
Posts: 180
Can wie do the Disable thing, here, too?


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] ButtonEx (all OS)
PostPosted: Thu Nov 21, 2019 3:02 pm 
Online
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1201
Location: Germany
Update: Added Attribute '#Corner'

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] ButtonEx (all OS)
PostPosted: Fri Nov 22, 2019 8:57 am 
Offline
Enthusiast
Enthusiast

Joined: Mon Jun 23, 2014 1:18 pm
Posts: 180
yeah... great 8)

Can I have a GetText for the button?

and a GetData and SetData?


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] ButtonEx (all OS)
PostPosted: Fri Nov 22, 2019 2:52 pm 
Online
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1201
Location: Germany
Update:
  • ButtonEx::GetText()
  • ButtonEx::SetData() / ButtonEx::GetData()

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] ButtonEx (all OS)
PostPosted: Wed Jan 22, 2020 7:26 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Mar 27, 2009 9:41 am
Posts: 748
Location: Athens, Greece
Is there a way to have a button like this one?
http://users.sch.gr/arahiotis/other/button.png


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] ButtonEx (all OS)
PostPosted: Thu Jan 23, 2020 8:00 am 
Online
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1201
Location: Germany
This is very special, but theoretically you could adjust ButtonEx accordingly.
With SetText() pass the 2 additional strings and let the Draw_() routine draw them.

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 30 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye