Jump to content
Sign in to follow this  
Almerto

Creating controls with arrays: problem re-calling them

Recommended Posts

Almerto

Hello everybody i have a question... Is it possible to create several (ipothetically infinite) controls with an automation like "For... To" and then somehow recall them later for example to pick only some of them and putting them in a control group within the GUI?

To explain better... For instance we have:

$heightinc=10
$List=IniRead ("Vocabulary.ini","Words Starting With A","A-Ast","");An ini file containing hundreds of words separated by "/"
$Array=StringSplit ($List, "/")

For $i=1 To $Array[0]                                                               ;where we can imagine the array to be very big
GuiCtrlCreateLabel($Array[$i],1,$heightinc,80,20)
$heightinc=($heightinc+10)                                                      ;this will avoid the words to be put one on top of each other
Next

Then in my GUI i'll have a bunch of words and i want to select only few of them... i wanted to make this by clicking on them (on the label corresponding to the desired word) then pressing a button to confirm my choice and them would be added let's say in a GroupBox near! But i cant really figure how to do it... Giving each one a variable on his own is impossible.

The thing gets more complicated since i want to make the selected words to be re-selectable for reading/editing, so the script should recognize what he's working on...

Any help is highly appreciated! Many thanks...

Alberto

Edited by Almerto

Share this post


Link to post
Share on other sites
storme

Hello everybody i have a question... Is it possible to create several (ipothetically infinite) controls with an automation like "For... To" and then somehow recall them later for example to pick only some of them and putting them in a control group within the GUI?

Check out my post GUI Control Array Grid, Setup a grid of GUI controls for user interaction it should give you enough information to do what you you want to do.

Good Luck

John Morrison

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.