Get the formattedwidth of super power button
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Get the formattedwidth of super power button
Hi all,
I try to use the following to get the formattedwidth of a widget "super power button"
put the formattedwidth of widget "superpowerbutton1" into aval
answer aval
but the answer is empty.
Does there any method to get the formattedwidth of the widget?
Regards
Terry Ho
I try to use the following to get the formattedwidth of a widget "super power button"
put the formattedwidth of widget "superpowerbutton1" into aval
answer aval
but the answer is empty.
Does there any method to get the formattedwidth of the widget?
Regards
Terry Ho
-
- Livecode Opensource Backer
- Posts: 9762
- Joined: Fri Feb 19, 2010 10:17 am
Re: Get the formattedwidth of super power button
From my reading of the LC Dictionary I am not sure if
formattedWidth can be used for widgets.
formattedWidth can be used for widgets.
Re: Get the formattedwidth of super power button
Hi Terry,
if you want to know the width of the powerButton widget then ask for the width.
I do not see anything resembling formattedWith in the dictionary of powerbutton.
Kind regards
Bernd
if you want to know the width of the powerButton widget then ask for the width.
I do not see anything resembling formattedWith in the dictionary of powerbutton.
Kind regards
Bernd
Re: Get the formattedwidth of super power button
I think Ralph has included a formattedWidth property with the new version of UniversalButton (which is fairly identical to PowerButton and both may indeed be Ralph's).
Have a look at his GitHub repository: https://github.com/revig/universal-button-widget
Have a look at his GitHub repository: https://github.com/revig/universal-button-widget
-
- Posts: 40
- Joined: Sun Dec 13, 2015 6:05 pm
Re: Get the formattedwidth of super power button
I think PowerButton is LiveCode's, they might look similar since (I guess) they might have some material guidelines in the design, I have used both, and they are not the same, not even close, so there are no formattedWidth property on the power button, just get its width
-
- Posts: 40
- Joined: Sun Dec 13, 2015 6:05 pm
Re: Get the formattedwidth of super power button
Just if it is implemented by the authorrichmond62 wrote: ↑Sat Nov 26, 2022 5:21 pmFrom my reading of the LC Dictionary I am not sure if
formattedWidth can be used for widgets.
Re: Get the formattedwidth of super power button
Hi all,
Just solve it. By create a hide button, put the power button in this hide button and under this hide button to calculate fontsize.
Regards
Terry Ho
Just solve it. By create a hide button, put the power button in this hide button and under this hide button to calculate fontsize.
Regards
Terry Ho
-
- Posts: 40
- Joined: Sun Dec 13, 2015 6:05 pm
Re: Get the formattedwidth of super power button
Hey Terry, not sure in what scenario are you doing this, and what exactly you need but why don't you just submit a feature request here: https://quality.livecode.com
I asked for a couple of additions time ago and in the next update of the enhancements pack it was implemented
-
- VIP Livecode Opensource Backer
- Posts: 9960
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Get the formattedwidth of super power button
I wonder if it will be easier to add that feature to the widget in LCB or to add that and more with a fresh implementation under the resurrected plan to provide widgets as LCS groups?prometheus wrote: ↑Wed Nov 30, 2022 6:53 pm...why don't you just submit a feature request here: https://quality.livecode.com
I asked for a couple of additions time ago and in the next update of the enhancements pack it was implemented
I haven't yet delved into all the new add-ons. What does this new button widget do that the other five ways to make a button doesn't?
And why so many ways to make one control type? What does that communicate to new users?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Posts: 40
- Joined: Sun Dec 13, 2015 6:05 pm
Re: Get the formattedwidth of super power button
Richard I think that reduces it to a matter of individual preference, I use that one because it has what I need, without any extra coding I have:
A nice ripple effect
Gradients
Full control of the label and icon positioning
Ability to work as a switch/checkbox
A lot of color customization possibilities
All of that saves me from a lot of extra coding
Kudos
A nice ripple effect
Gradients
Full control of the label and icon positioning
Ability to work as a switch/checkbox
A lot of color customization possibilities
All of that saves me from a lot of extra coding
Kudos