It is currently Wed Sep 18, 2019 8:59 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 21 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: [Module] ButtonEx (all OS)
PostPosted: Mon Jul 29, 2019 11:26 am 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 892
Location: Germany
It cannot work without EventType() query, because the CanvasGadget sends an event with every mouse movement.

Code:
Case #ButtonML
  If EventType() = ButtonEx::#EventType_Button
    Debug "Multiline button pressed"
    ButtonEx::SetColor(#ButtonML,ButtonEx::#BackColor,$0000ff)
    ButtonEx::SetText(#ButtonML,"new text")
  EndIf

Use instead: ButtonEx::#Event_Gadget

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

Download of PureBasic - Modules (GitHub)

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


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] ButtonEx (all OS)
PostPosted: Mon Jul 29, 2019 7:48 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Mar 27, 2009 9:41 am
Posts: 719
Location: Athens, Greece
What about the other drawing problems?


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] ButtonEx (all OS)
PostPosted: Tue Jul 30, 2019 11:32 am 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 892
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 (GitHub)

[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: 719
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 
Offline
Addict
Addict
User avatar

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

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

Download of PureBasic - Modules (GitHub)

[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 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 892
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 (GitHub)

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


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 13 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