CheckButtonEx  Top  Previous  Next



WindowsID = CheckButtonEx(WindowID.i, ButtonID.l, X.l, Y.l, Width.l, Height.l, Text$, Skin.i)


Creates a skinned check box ButtonEx in the specified WindowID.i.

ButtonID.l specifies the internal ID of the CheckButtonEx and if #ProGUI_Any is used then the returned value will be the new CheckButtonEx ID. X.l, Y.l, Width.l and Height.l are the position and dimensions of the CheckButtonEx.

Text$ is the text that will be displayed in the CheckButtonEx and can be an empty string.

Skin.i specifies what skin the CheckButtonEx will use and can be either a handle to a skin or if zero will render the CheckButtonEx using the default system check  box button skin. Please see Skin States & Properties for creating/editing CheckButtonEx skins.

When the CheckButtonEx is clicked, a #WM_COMMAND message will be posted to WindowID's message queue containing the ButtonID, which can be detected as a PureBasic #PB_Event_Menu event.

The current checked state can be retrieved or set using the GetButtonExState and SetButtonExState commands.

The check button can also be set to an "inbetween" state by specifying #BUTTONEX_INBETWEEN using SetButtonExState. The "inbetween" state is useful for representing multiple items that are not all of the same state (i.e. on or off), for example the installable features of an application where some features are not "ticked" by default. Clicking on the check button would then bring them from the "inbetween" state to be either all on or all off.


Returns the WindowsID (HWND) of the CheckButtonEx (or if #ProGUI_Any is used the CheckButtonEx ID) or zero for failure.



ButtonEx Index