Page 2 of 3

Re: [Module] ButtonEx (all OS)

Posted: Tue Jul 30, 2019 11:32 am
by Thorsten1867
Update:
  • Bugfixes
  • Support of #LF$ for multiline - buttons

Re: [Module] ButtonEx (all OS)

Posted: Wed Jul 31, 2019 2:35 pm
by doctorized
Set text to #BUTTONML to "Nokia Phone" and after line

Code: Select all

Debug "Multiline button pressed"
add:

Code: Select all

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

Re: [Module] ButtonEx (all OS)

Posted: Wed Jul 31, 2019 9:44 pm
by Thorsten1867
Bug fixed

Re: [Module] ButtonEx (all OS)

Posted: Tue Sep 03, 2019 5:26 pm
by Thorsten1867
Update: dynamic text size (needs ModuleEx.pbi)

Re: [Module] ButtonEx (all OS)

Posted: Sun Nov 17, 2019 4:18 pm
by Cyllceaux
Line 64: XIncludeFile "ModuleEx.pbi"

Re: [Module] ButtonEx (all OS)

Posted: Sun Nov 17, 2019 4:19 pm
by Thorsten1867
Fixed

Re: [Module] ButtonEx (all OS)

Posted: Wed Nov 20, 2019 8:14 am
by Cyllceaux
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.

Re: [Module] ButtonEx (all OS)

Posted: Wed Nov 20, 2019 2:57 pm
by Thorsten1867
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.

Re: [Module] ButtonEx (all OS)

Posted: Wed Nov 20, 2019 3:05 pm
by Cyllceaux
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: Select all

DisplayPopupMenu(BtEx()\PopupNum, WindowID(BtEx()\Window\Num), dpiX(dX)+GadgetWidth(BtEx()\CanvasNum)-dpiy(20), dpiY(dY))

Re: [Module] ButtonEx (all OS)

Posted: Wed Nov 20, 2019 4:15 pm
by Cyllceaux
Can wie do the Disable thing, here, too?

Re: [Module] ButtonEx (all OS)

Posted: Thu Nov 21, 2019 3:02 pm
by Thorsten1867
Update: Added Attribute '#Corner'

Re: [Module] ButtonEx (all OS)

Posted: Fri Nov 22, 2019 8:57 am
by Cyllceaux
yeah... great 8)

Can I have a GetText for the button?

and a GetData and SetData?

Re: [Module] ButtonEx (all OS)

Posted: Fri Nov 22, 2019 2:52 pm
by Thorsten1867
Update:
  • ButtonEx::GetText()
  • ButtonEx::SetData() / ButtonEx::GetData()

Re: [Module] ButtonEx (all OS)

Posted: Wed Jan 22, 2020 7:26 pm
by doctorized
Is there a way to have a button like this one?
http://users.sch.gr/arahiotis/other/button.png

Re: [Module] ButtonEx (all OS)

Posted: Thu Jan 23, 2020 8:00 am
by Thorsten1867
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.