Jump to content
Sign in to follow this  
UTA

creating controls in a loop?

Recommended Posts

UTA

Hi everybody,

I was wondering if it is possible to creat controls in a loop (dynamically) and afterwards to address them dynamically.

Imagine I want to create a (dynamic) number of icons next to each other. Later (in the sourcecode) I would like to address them dynamically the same way.

Something like the following (but that doesn't work):

Creation...

For $i=1 to $NumberIcons
    $Icon & $i = GUICtrlCreateIcon($i & ".ico",0, $i-1*$IconSize+2, 2, $IconSize, $IconSize)
Next

Address...

For $i=1 to $NumberIcons
    GUICtrlSetImage($Icon & $i, $i & ".ico")
Next

Is that possible somehow with autoit?

UTA

Share this post


Link to post
Share on other sites
UTA

Aaaarg... of course!

Thanks Jos!

Sometimes I don't see the wood for the trees...

UTA

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.