-
Feb 9th, 2025, 10:15 AM
#1
Thread Starter
PowerPoster
CREATE controll array for label on ide
I just hvae in my project a labels similar:
label1
label2
...
labelnnn
How to create a label array via ide, and at to the end of operation:
labe1(0)
label(2)
...
label(nnn)
Last edited by luca90; Feb 9th, 2025 at 10:20 AM.
-
Feb 9th, 2025, 11:18 AM
#2
Re: CREATE controll array for label on ide
Place a label on the form.
Then in the properties set the index to 0.
Now you have a control array.
If you copy and paste this control on the form then for each new instance the index will be incremented
-
Feb 9th, 2025, 11:38 AM
#3
Re: CREATE controll array for label on ide
 Originally Posted by luca90
I just hvae in my project a labels similar:
label1
label2
...
labelnnn
How to create a label array via ide, and at to the end of operation:
labe1(0)
label(2)
...
label(nnn)
Select Label1 and in Name delete last digit. Select Label2 and in Name delete last digit and accept creating a control array. Select Label3 and in Name delete last digit and it will auto-join the control array (no extra action needed) and so on for all the rest of the labels.
Now you have a giant control array called Label. That's what I usually do with my forms too but name the control array labLabel -- one control array to rule them all "anonymous" labels.
Whenever I need to address a label in code (change caption dynamicly, whatever) I always rename it to labSomeUsefulName so to exclude it from the giant control array mess.
cheers,
</wqw>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|