Sign in to follow this  
Followers 0
strate

GuiCtrlSetBkColor

6 posts in this topic

#1 ·  Posted (edited)

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...

Share this post


Link to post
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)

Share this post


Link to post
Share on other sites

Both of those methods I have tried and I have no success. I edited my post I did have it as a part of my array but typed it out wrong sorry.


INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...

Share this post


Link to post
Share on other sites

Thank you.


INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...

Share this post


Link to post
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
Sign in to follow this  
Followers 0