I need not each of control but I need to set text to some of each controls,
for example Textbox2.text.
So, I have a digit from property of other control 2
How can I set a etxt to Textbox2.Text?
--
View this message in context:
Use a collection
Assign existing textboxes like that:
Mycol[2]=textbox2
Then call the textbox like :
Mycol[myindex].text=Toto
Le 11 avr. 2014 11:23, abbat81 abbat...@mail.ru a écrit :
I need not each of control but I need to set text to some of each controls,
for example Textbox2.text.
So,
Please, help to understand it.
Dim Mycol As Collection
Mycol[2] = TextBox2
=Null Object
How to use it?
I realy cant find any example of using a controls by names.
Thanks
--
View this message in context:
http://gambas.8142.n7.nabble.com/How-to-set-name-of-control-tp46134p46147.html
Sent from
The object TextBox2 must already exist
Regards
*_*
*Lic. Daniel Quintero Rojas*
*¡Saludos desde México!*
On Fri, Apr 11, 2014 at 10:22 AM, abbat81 abbat...@mail.ru wrote:
Please, help to understand it.
Dim Mycol As Collection
Mycol[2] = TextBox2
=Null
The Textbox2 exist allready (((
--
View this message in context:
http://gambas.8142.n7.nabble.com/How-to-set-name-of-control-tp46134p46149.html
Sent from the gambas-user mailing list archive at Nabble.com.
--
Put Bad
TextBox1, TextBox2 and TextBox1 already exist in my form FMain (Obviously,
Button1 too):
Public Sub Button1_Click()
Dim col As New Collection
Dim i As Integer
col[1] = TextBox1
col[2] = TextBox2
col[3] = TextBox3
For i = 1 To 3
col[CStr(i)].Text = TextBox: CStr(i)
Next
End
On Fri, 11 Apr 2014 09:23:22 -0700 (PDT), abbat81 abbat...@mail.ru
wrote:
The Textbox2 exist allready (((
Dim Mycol As Collection
Mycol[2] = TextBox2
Null Object comes from Mycol
try
Dim Mycol As New Collection
Mycol[2] = TextBox2
Amicalement
Charlie
Thank you, finelly I got it.
--
View this message in context:
http://gambas.8142.n7.nabble.com/How-to-set-name-of-control-tp46134p46152.html
Sent from the gambas-user mailing list archive at Nabble.com.
--
Put Bad
How to do this:
Dim i as integer
For i = 1 to 3
Textbox[i].Text = i ' Textbox1.Text, Textbox2.Text and Textbox3.Text
Next
Thanks
--
View this message in context:
http://gambas.8142.n7.nabble.com/How-to-set-name-of-control-tp46134.html
Sent from the gambas-user mailing list archive at
What are you trying to achieve?
Dim hTextBoxes As New TextBox[10]
For ii = 1 To 3
hTextBoxes[ii] = New TextBox(Me) As Textbox CStr(ii)
Next
There is also Name property if you want to change name of existing
textbox...
Jussi
On Thu, Apr 10, 2014 at 11:58 PM, abbat81 abbat...@mail.ru
If the textboxes are already existing, then I think you should put them
into some container or collection.
Example, in container:
Dim hTextBox As TextBox
For Each hTextBox In ToolPanel1.Children 'or hMyCollection
Next
You can identify the boxes with Tag, Name, or whatever.
Jussi
11 matches
Mail list logo