Display Text from variable in text box 
Author Message
 Display Text from variable in text box

Can anyone help? *please*,  Iam a new VB user.

I am trying to display text in a TextBox (on form 3)

The text displayed at the moment is "Text1" (as per the properties)
When I run the prog, I can overtype "Text1" in the box, my appears but
this is the only way I can see the text.  (btw the text is held
in a variable)

I know this is very 'basic' and I must be missing the point some where,
I've tried the SelText routine etc., but I either get nothing or the
result described above.

Any help would be appreciated

Please EMail

Thank you

Nick

 --
---------------------------------------------------------------------

                                                              __//\
                                                             *   >
---------------------------------------------------------------- * --



Sun, 08 Feb 1998 03:00:00 GMT  
 Display Text from variable in text box

Quote:

>Can anyone help? *please*,  Iam a new VB user.

>I am trying to display text in a TextBox (on form 3)

>The text displayed at the moment is "Text1" (as per the properties)
>When I run the prog, I can overtype "Text1" in the box, my appears but
>this is the only way I can see the text.  (btw the text is held
>in a variable)

>I know this is very 'basic' and I must be missing the point some where,
>I've tried the SelText routine etc., but I either get nothing or the
>result described above.

[sig snipped]

To get at the text in the text box you need to use
<Textboxname>.text. So, to put the text from a variable into
the text box, you would use text1.text=variable$. To go the
other way and put the text into a variable, use
variable$=text1.text.

BTW, you use the '.' syntax to get at all the properties for
objects (ie things on the form) So to read the settings for
the backcolour of a label into a variable, you would use:
variable=Label1.backcolor (horrible US spelling intended :))

Hope this helps,
Chris Willetts



Sun, 08 Feb 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Text Box Entry To Text Box Display?

2. passing variables from a text box to a document.write text box

3. reading a text file to display in text box

4. Rich Text box displaying last inserted text?

5. grabbing text and displaying it in a text box

6. Displaying text in a multiline text box

7. Text Box Text Displays Question

8. Displaying formatted text in a text box or grid

9. I need to display the text of an html file in a text box

10. Display Only Text Box - Text Color/Background Color

11. Displaying a text file in a text box

12. text entered into Text box increments a variable

 

 
Powered by phpBB® Forum Software