Jump to content

Recommended Posts

Posted

This is probably so obvious, but what does it mean when using -1 for the controlID? It seems like it refers back to the create function handle, but I didn't see anything mentioned explicitly in the Help files other than "The control identifier (controlID) as returned by a GUICtrlCreate... function."

e.g.

$generalitem    = GUICtrlCreateTreeViewitem("General", $treeview)
GUICtrlSetColor(-1, 0x0000C0)

Thanks

Posted

Using -1 as the control ID, uses the ID of the previously created Control.

For example, in this case the function GUICtrlSetColor will use the controlID of $generalitem_2

$generalitem= GUICtrlCreateTreeViewitem("General", $treeview)
$generalitem_2= GUICtrlCreateTreeViewitem("General", $treeview)
GUICtrlSetColor(-1, 0x0000C0)
Posted (edited)

Using -1 as the control ID, uses the ID of the previously created Control.

For example, in this case the function GUICtrlSetColor will use the controlID of $generalitem_2

$generalitem= GUICtrlCreateTreeViewitem("General", $treeview)
$generalitem_2= GUICtrlCreateTreeViewitem("General", $treeview)
GUICtrlSetColor(-1, 0x0000C0)

I kind of thought so. Is saying this is a handle to the control the same as the ID?

Edited by JusGellin

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...