Please Add IsGadgetDisabled
Please Add IsGadgetDisabled
Please Add IsGadgetDisabled (or what ever name you like) as a PB native command.
Thanks
fsw
Thanks
fsw
Use Set/GetGadgetData ?
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)
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)
- Michael Vogel
- Addict
- Posts: 2798
- Joined: Thu Feb 09, 2006 11:27 pm
- Contact:
Re: Please Add IsGadgetDisabled
Wouldn't be an internal PB function for IsGadgetEnabled executed a little bit faster than IsGadgetDisabled?fsw wrote:Please Add IsGadgetDisabled (or what ever name you like) as a PB native command.
Thanks
fsw
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Re: Please Add IsGadgetDisabled
A disabled gadget should take longer to report its status, it only makes sense as it's going to be using a walker.
BERESHEIT
Re: Please Add IsGadgetDisabled
Some more GetGadgetState like:
would usefull!
Code: Select all
GetGadgetState(Gadget, #PB_IsGadgetDisabled)
GetGadgetState(Gadget, #PB_IsGadgetHidden)
GetGadgetState(Gadget, #PB_IsGadgetByBullFrogDesign) ;-)
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

- Andre
- PureBasic Team
- Posts: 2137
- Joined: Fri Apr 25, 2003 6:14 pm
- Location: Germany (Saxony, Deutscheinsiedel)
- Contact:
Re: Please Add IsGadgetDisabled
@ts-soft: +1 

Re: Please Add IsGadgetDisabled
+1
That's what i needed today.
That's what i needed today.
PB 5.70 LTS (x64) - Debian Testing, Gnome 3.30.2
Re: Please Add IsGadgetDisabled
State is for the items only, I prefer Attribute:
GetGadgetAttribute(Gadget, #PB_Gadget_Disabled)
GetGadgetAttribute(Gadget, #PB_Gadget_Disabled)
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
Re: Please Add IsGadgetDisabled
+1 for disabled and visible state.
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
Re: Please Add IsGadgetDisabled
+1
Intel Core i7 Quad 2.3 Ghz, 8GB RAM, GeForce GT 630M 2GB, Windows 10 (x64)
Re: Please Add IsGadgetDisabled
Why not only DisableGadget with a return value?
Code: Select all
If DisableGadget(#Gadget) = #True
...
EndIf
sorry for my bad english
Re: Please Add IsGadgetDisabled
@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.
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.
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
Re: Please Add IsGadgetDisabled
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
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
sorry for my bad english