Page 1 of 1

GetGadgetItemState #PB_ListIcon_Checked (PB 5.30)

Posted: Tue Sep 09, 2014 6:46 pm
by maslobojik
PureBasic (5.30).

If ListIconGadget with #PB_ListIcon_CheckBoxes flag then GetGadgetItemState return value 3 of #PB_ListIcon_Checked. But #PB_ListIcon_Checked = 2

Re: GetGadgetItemState #PB_ListIcon_Checked (PB 5.30)

Posted: Tue Sep 09, 2014 10:54 pm
by PB
Please post code showing the problem, because I bet you're
not checking it with the & symbol like the Help says. ;)

Re: GetGadgetItemState #PB_ListIcon_Checked (PB 5.30)

Posted: Thu Sep 11, 2014 3:47 am
by netmaestro
3 & #PB_ListIcon_Checked = 2, which is not equal to 0, so it works. You can't test the gadget item state = #PB_ListIcon_Checked because it also contains other states. Just check if the bit you are interested is set or not. Use a bitwise AND.