![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Good Afternoon to everybodies!
![]() I've a little problem, obviously. I've 81 TextBox and I need to write everyone at same time using a For cicle. In VB6 I can draw every TextBox with same name and use an index (Index). I don't find that in Basic4ppc... I suppose using ArrayList but I don't know this object ![]() Example If I was 3 TextBox1: TextBox1(0) TextBox1(1) TextBox1(2) It should have to sound so (this code is a mix between B4ppc and Index like VB6): Sub Button1_Click For i =0 to 2 TextBox1(i).Color = cRed Next i End Sub Sub Button2_Click For i =0 to 2 TextBox1(i).Color = cGreen Next i End Sub Thax! |
|
||||
|
This tutorial will help you: Runtime controls manipulation
If you've named your textboxes: TextBox1, TextBox2... you can use: Code:
For i = 1 to n
Control("TextBox" & i).Color = cRed
Next
|
|
|||
|
Dear Peptone,
you can use the Control keyword (see the helpfile) In your example you could have three different textboxes TextBox1 TextBox2 TextBox3 and then change the color as below Sub Button1_Click For i =1 to 3 Control("TextBox"&i).Color = cRed Next i End Sub and so on. all the best / Björn Editing: Arrgh, too late... Erel, you got there first as usual |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| retrieve images and index | lux1963 | Questions & Help Needed | 3 | 05-18-2008 02:42 PM |
| Addrow like removerow(index) | Vito | Questions & Help Needed | 3 | 02-04-2008 02:09 PM |
| Arraylist | tvrman | Questions & Help Needed | 7 | 07-01-2007 11:42 AM |
| Index problem in the IF statement | markus | Questions & Help Needed | 2 | 06-03-2007 02:10 PM |
| Index was out of range error in version 5 | HARRY | Questions & Help Needed | 6 | 05-20-2007 09:16 AM |