Jump to content

GuiCtrlSetBkColor


strate
 Share

Recommended Posts

When I place either -- GUICtrlSetBkColor (-1, 0x00ff00) or GUICtrlSetBkColor ($C, 0x00ff00) right after the first half in my loop like this

$FTC[$C] = GUICtrlCreateButton("", $TopLeftRack_X, $TopLeftRack_Y, 20, 20)
GUICtrlSetBkColor ($FTC[$C], 0x00ff00)

I dont get the desired result is this because its a button, or that I'm a fool?

Edited by strate
INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...
Link to comment
Share on other sites

You can do it two ways:

1. Use the array element you just assigned a control number to.

$FTC[$C] = GUICtrlCreateButton("", $TopLeftRack_X, $TopLeftRack_Y, 20, 20)
GUICtrlSetBkColor ($FTC[$C], 0x00ff00)

2. Use -1 to let AutoIt know that it has to use the last created control.

$FTC[$C] = GUICtrlCreateButton("", $TopLeftRack_X, $TopLeftRack_Y, 20, 20)
GUICtrlSetBkColor (-1, 0x00ff00)
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...