Checkbox Auto-ThreeState

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
chi
Addict
Addict
Posts: 1087
Joined: Sat May 05, 2007 5:31 pm
Location: Austria

Checkbox Auto-ThreeState

Post by chi »

Why can the "in between" state (#PB_CheckBox_ThreeState) of checkboxes only set programmatically on Windows/Linux? Referring to Keya's post it works on Mac automatically and it would be pretty simple to change it for Windows... (don't know for Linux though)

Code: Select all

OpenWindow(0, 0, 0, 130, 90, "", #PB_Window_SystemMenu|#PB_Window_ScreenCentered)

CheckBoxGadget(0, 10, 20, 110, 20, "PB's ThreeState", #PB_CheckBox_ThreeState)

CheckBoxGadget(1, 10, 50, 110, 20, "Correct ThreeState")
SetWindowLongPtr_(GadgetID(1), #GWL_STYLE, GetWindowLongPtr_(GadgetID(1), #GWL_STYLE) & ~#BS_AUTOCHECKBOX | #BS_AUTO3STATE)

While WaitWindowEvent() ! #PB_Event_CloseWindow : Wend 
Et cetera is my worst enemy