Page 1 of 1

SetGadgetItemState(....) question

Posted: Fri Feb 22, 2013 2:35 pm
by SFSxOI
The help has this for 'SetGadgetItemState':
SetGadgetItemState(#Gadget, Item, State)

- ListIconGadget(): Combination of the following values:
#PB_ListIcon_Selected : The item should be selected.
#PB_ListIcon_Checked : The item should have its checkbox checked (#PB_ListIcon_CheckBoxes flag).
#PB_ListIcon_Inbetween: The item should have its checkbox in the in between state (#PB_ListIcon_ThreeState flag).
Evidently according to the help there is no valid condition or setting where the ListIconGadget() gadget state can be set to unchecked by use of SetGadgetItemState(...), and the help does not mention any other methods for setting the state to unchecked (yes, before anyone posts "just uncheck it." or similar, its understood that it can be manually unchecked). Why doesn't PureBasic have a state of '#PB_ListIcon_UnChecked' available for use with the 'SetGadgetItemState(...)' function when setting a ListIconGadget() gadget state ?

Re: SetGadgetItemState(....) question

Posted: Thu Aug 20, 2015 7:10 pm
by Keya
I came across this when searching for an uncheck option for tree control and it had no replies/answers so I'm just appending for future reference.
SFSxOI wrote:Why doesn't PureBasic have a state of '#PB_ListIcon_UnChecked' available
Although there is no "#PB_ListIcon_Unchecked" (or "#PB_Tree_Unchecked" in my case) ... there is a........ wait for it....... 0, which does the trick :)