Sign in to follow this  
Followers 0
UTA

creating controls in a loop?

3 posts in this topic

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



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  
Followers 0