Page 1 of 1
Please Add IsGadgetDisabled
Posted: Tue Dec 16, 2008 8:43 pm
by fsw
Please Add IsGadgetDisabled (or what ever name you like) as a PB native command.
Thanks
fsw
Posted: Tue Dec 16, 2008 10:18 pm
by ozzie
+1
I'm writing for Windows, Mac and Linux, so Windows-only solutions are not suitable.
Use Set/GetGadgetData ?
Posted: Mon Dec 22, 2008 6:26 am
by USCode
Maybe it would be more appropriate to be able to use GetGadgetState with a couple new #PB_... flags to represent if the gadget is enabled or disabled?
Alternatively, if you set the gadget as enabled/disabled you could also then set a custom flag using the SetGadgetData function, then use GetGadgetData to retrieve the value to see if it's currently enabled/disabled.
(assuming you're not already using that data for some other feature)
Re: Please Add IsGadgetDisabled
Posted: Wed Jul 20, 2011 2:00 pm
by Michael Vogel
fsw wrote:Please Add IsGadgetDisabled (or what ever name you like) as a PB native command.
Thanks
fsw
Wouldn't be an internal PB function for IsGadgetEnabled executed a little bit faster than IsGadgetDisabled?
Re: Please Add IsGadgetDisabled
Posted: Wed Jul 20, 2011 3:26 pm
by netmaestro
A disabled gadget should take longer to report its status, it only makes sense as it's going to be using a walker.
Re: Please Add IsGadgetDisabled
Posted: Wed Jul 20, 2011 4:00 pm
by ts-soft
Some more GetGadgetState like:
Code: Select all
GetGadgetState(Gadget, #PB_IsGadgetDisabled)
GetGadgetState(Gadget, #PB_IsGadgetHidden)
GetGadgetState(Gadget, #PB_IsGadgetByBullFrogDesign) ;-)
would usefull!
Re: Please Add IsGadgetDisabled
Posted: Wed Jul 20, 2011 8:41 pm
by Andre
@ts-soft: +1

Re: Please Add IsGadgetDisabled
Posted: Fri Jun 28, 2013 4:31 pm
by uwekel
+1
That's what i needed today.
Re: Please Add IsGadgetDisabled
Posted: Fri Jun 28, 2013 4:53 pm
by STARGĂ…TE
State is for the items only, I prefer Attribute:
GetGadgetAttribute(Gadget, #PB_Gadget_Disabled)
Re: Please Add IsGadgetDisabled
Posted: Fri Jun 28, 2013 7:40 pm
by c4s
+1 for disabled and visible state.
Re: Please Add IsGadgetDisabled
Posted: Sun Jun 30, 2013 5:56 pm
by Olby
+1
Re: Please Add IsGadgetDisabled
Posted: Sun Jun 30, 2013 6:21 pm
by Josh
Why not only
DisableGadget with a return value?
Code: Select all
If DisableGadget(#Gadget) = #True
...
EndIf
Re: Please Add IsGadgetDisabled
Posted: Sun Jun 30, 2013 7:17 pm
by c4s
@Josh
What if you only want to get the state of he gadget and not actually disable it? Also this would introduce some kind of "meta behavior" which isn't really clear and should be avoided if possible - similar as currently having to use FileSize() to check if a file exists or is a directory.
Re: Please Add IsGadgetDisabled
Posted: Sun Jun 30, 2013 8:45 pm
by Josh
c4s,
can't see the problem from our side. If such a construct is a problem for fred, is a other problem
SET a property:
DisableGadget (#Gadget, Status)
GET a property:
If DisableGadget (#Gadget)
...
EndIf