Setting Gadget Flags

Just starting out? Need help? Post your questions and find answers here.
User avatar
Inner
PureBasic Expert
PureBasic Expert
Posts: 714
Joined: Fri Apr 25, 2003 4:47 pm
Location: New Zealand

Setting Gadget Flags

Post by Inner »

How do you set gadget flags after they've been created.

I need to set listicongadget() to set #LVS_AUTOARRANGE in one mode and not in the other.
freak
PureBasic Team
PureBasic Team
Posts: 5948
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

Code: Select all

Styles.l = GetWindowLong_( GadgetID(#Gadget), #GWL_STYLE)
Styles = Styles | #LVS_AUTOARRANGE 
SetWindowLong_( GadgetID(#Gadget), #GWL_STYLE, Styles)
If you want to remove a Flag, instead of adding it, you can use
Styles = Styles &~ #LVS_AUTOARRANGE

Timo
quidquid Latine dictum sit altum videtur
User avatar
Inner
PureBasic Expert
PureBasic Expert
Posts: 714
Joined: Fri Apr 25, 2003 4:47 pm
Location: New Zealand

Post by Inner »

Thanks, I knew it was something like that, mental block :) thanks alot.
Post Reply