Images in an array

Good morning everyone,

Is it possible to reference images in an array? I am playing with hiding/unhiding any of a large number of “smallcheck” images based on some index. It doesn’t appear that I can put a variable ?usevariable[ n ] on an image. I don’t see anything in the documentation. Any thoughts? Thank you.

Doug Selzler

You can certainly use an array of integers to hold the FEQ of the IMAGE controls.

You’d need to initialize it with the actual image FEQs after opening the window, but then you can access the array to get the FEQ.

Or maybe you could use a listbox and display the images based on PROP:IconList.

What I probably should have asked is “can a label be in an array?” Besides the images, I would like to identify sheet tabs as array elements. It doesn’t look like they can. Anybody have some clever slight of hand to accomplish something like this?

Thanks,
Doug

Look up PROP:Child in the help.

One other way to deal with multiple Images is to CREATE() them or CLONE() one then set properties. You would track the FEQ’s in a Queue or Array, i.e. the FEQ returned by Create / Clone.


As Jeff said shown below example of PROP:Child to enumerate Tabs on a Sheet:

 LOOP TbNdx=1 TO ?Sheet1{PROP:NumTabs}
     TbFEQ=?Sheet1{PROP:Child,TbNdx}
     TbFEQ{PROP:Text}=CHOOSE(TbNdx,'&Alfa','Bravo','&Charlie','&Delta','&Echo', |
               '&Foxtrot','&Golf','&Hotel','&India','&Juliett','&Kilo','&Lima')
     TbFEQ{PROP:Tip}='Tab' & TbNdx
  END

You could loop once and store the TAB FEQ’s in an Array or Queue for code not using PROP’s elsewhere.


You may be interested in my Sheet / Tab Property example:

Lots of fun stuff here for me to play with.
Thanks gentlemen.