[Gambas-user] Phone center

Pozzo mauriiiii3001 at ...325...
Sun Feb 8 19:15:26 CET 2004


I'm writing a program that emulate a phone center with 9 possibles 
telephones but only 4 lines so if all the lines are occupated I write in 
a label  "The phone center is busy". I can use many if-then-else to do 
this but in VB I used an array of textboxes and a few of for cicles. I 
tried to use the group property with the tag but I don't know how to 
write something in the textbox that have the tag (i)
Maybe I didn't explain my so I write you some code.
I want to do this:

dim i as integer
for i=0 to 3
if txtbox.tag(i).text = "" then 'txtbox is a group of 4 textboxes, I 
wanna check if the textbox.text with tag set to i is ""
txtbox.tag(i).text = last.tag 'if so I write there the tag of the last 
button press
end if
next

In vb i used something lik this:

sub check (butt as string)
for i=0 to 3
if
txtbox[i].text = "" then 'there are 4 txtboxes with name txtbox[0], 
txtbox[1], txtbox[2] and txtbox[3]
txtbox[i].text =  butt 'this sub get the caption of the button which was 
press
end if
next
end sub






More information about the User mailing list