is it possible to insert the no, of text boxes at the run time. i want the messages to be in the text boxes rather than message box.
insert the text boxes at run time
Collapse
X
-
Tags: None
-
yesOriginally posted by coolmindedis it possible to insert the no, of text boxes at the run time. i want the messages to be in the text boxes rather than message box.
for that create ctrl array and use following code
Code:Private Sub Form_Load() Load Text1(1) Text1(1).Visible = True Text1(1).Left = Me.Left Text1(1).Top = Me.Top End Sub
-
hi
i have to show the values of no. of record in the text boxes. when i click any button, the values should be displayed in the text boxes one by one. now i am showing the values in the same text box. when i click any button, the previous value disappears and the new value is displayed. i want to store all the values shown in the text box and to display too.
as we can show the values of the recordset in the datagrid, i want to show it in the textboxes. in the datagrid, the no. of rows increases as the data increases, likewise i want to show the data in the textbox and increase the no. as the data increases.Comment
-
see its not a good practiseOriginally posted by coolmindedhi
i have to show the values of no. of record in the text boxes. when i click any button, the values should be displayed in the text boxes one by one. now i am showing the values in the same text box. when i click any button, the previous value disappears and the new value is displayed. i want to store all the values shown in the text box and to display too.
as we can show the values of the recordset in the datagrid, i want to show it in the textboxes. in the datagrid, the no. of rows increases as the data increases, likewise i want to show the data in the textbox and increase the no. as the data increases.
but still ua may handle this case using xml file or notepad file
link each record with the index of text box and some other related detailsComment
-
If you are using VB6, then as vijaydiwakar pointed out in his first response, you can use a control array. This allows you to add more elements (in this case, textboxes) at runtime.Originally posted by coolmindedi have to show the values of no. of record in the text boxes. when i click any button, the values should be displayed in the text boxes one by one. now i am showing the values in the same text box. when i click any button, the previous value disappears and the new value is displayed. i want to store all the values shown in the text box and to display too.
as we can show the values of the recordset in the datagrid, i want to show it in the textboxes. in the datagrid, the no. of rows increases as the data increases, likewise i want to show the data in the textbox and increase the no. as the data increases.
If you are using VB.Net then I have no idea how you add controls at runtime.
One thing to keep in mind. If you know the maximum number of textboxes you will need, you could create them all at design time, then just set their Visible property to hide or show them.Comment
Comment