PureBasic (5.30).
If ListIconGadget with #PB_ListIcon_CheckBoxes flag then GetGadgetItemState return value 3 of #PB_ListIcon_Checked. But #PB_ListIcon_Checked = 2
GetGadgetItemState #PB_ListIcon_Checked (PB 5.30)
-
- User
- Posts: 36
- Joined: Thu Jul 11, 2013 11:17 pm
Re: GetGadgetItemState #PB_ListIcon_Checked (PB 5.30)
Please post code showing the problem, because I bet you're
not checking it with the & symbol like the Help says.
not checking it with the & symbol like the Help says.

I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Re: GetGadgetItemState #PB_ListIcon_Checked (PB 5.30)
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.
BERESHEIT