PureBasic Forum
https://www.purebasic.fr/english/

[Module] ButtonEx (all OS)
https://www.purebasic.fr/english/viewtopic.php?f=27&t=72520
Page 2 of 3

Author:  Thorsten1867 [ Tue Jul 30, 2019 11:32 am ]
Post subject:  Re: [Module] ButtonEx (all OS)

Update:
  • Bugfixes
  • Support of #LF$ for multiline - buttons

Author:  doctorized [ Wed Jul 31, 2019 2:35 pm ]
Post subject:  Re: [Module] ButtonEx (all OS)

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.)

Author:  Thorsten1867 [ Wed Jul 31, 2019 9:44 pm ]
Post subject:  Re: [Module] ButtonEx (all OS)

Bug fixed

Author:  Thorsten1867 [ Tue Sep 03, 2019 5:26 pm ]
Post subject:  Re: [Module] ButtonEx (all OS)

Update: dynamic text size (needs ModuleEx.pbi)

Author:  Cyllceaux [ Sun Nov 17, 2019 4:18 pm ]
Post subject:  Re: [Module] ButtonEx (all OS)

Line 64: XIncludeFile "ModuleEx.pbi"

Author:  Thorsten1867 [ Sun Nov 17, 2019 4:19 pm ]
Post subject:  Re: [Module] ButtonEx (all OS)

Fixed

Author:  Cyllceaux [ Wed Nov 20, 2019 8:14 am ]
Post subject:  Re: [Module] ButtonEx (all OS)

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.

Author:  Thorsten1867 [ Wed Nov 20, 2019 2:57 pm ]
Post subject:  Re: [Module] ButtonEx (all OS)

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.

Author:  Cyllceaux [ Wed Nov 20, 2019 3:05 pm ]
Post subject:  Re: [Module] ButtonEx (all OS)

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))

Author:  Cyllceaux [ Wed Nov 20, 2019 4:15 pm ]
Post subject:  Re: [Module] ButtonEx (all OS)

Can wie do the Disable thing, here, too?

Author:  Thorsten1867 [ Thu Nov 21, 2019 3:02 pm ]
Post subject:  Re: [Module] ButtonEx (all OS)

Update: Added Attribute '#Corner'

Author:  Cyllceaux [ Fri Nov 22, 2019 8:57 am ]
Post subject:  Re: [Module] ButtonEx (all OS)

yeah... great 8)

Can I have a GetText for the button?

and a GetData and SetData?

Author:  Thorsten1867 [ Fri Nov 22, 2019 2:52 pm ]
Post subject:  Re: [Module] ButtonEx (all OS)

Update:
  • ButtonEx::GetText()
  • ButtonEx::SetData() / ButtonEx::GetData()

Author:  doctorized [ Wed Jan 22, 2020 7:26 pm ]
Post subject:  Re: [Module] ButtonEx (all OS)

Is there a way to have a button like this one?
http://users.sch.gr/arahiotis/other/button.png

Author:  Thorsten1867 [ Thu Jan 23, 2020 8:00 am ]
Post subject:  Re: [Module] ButtonEx (all OS)

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.

Page 2 of 3 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/