|
-
May 25th, 2000, 10:05 PM
#1
Thread Starter
Addicted Member
I'm trying to control the text in some textboxes at run-time using the IF THEN feature. I want to know how i can control how the text is displayed in the text boxes. For example,
if combo2.text = qtr1 then
text1.text = "ACTUAL 3/31/00"
I want the word ACTUAL on one line and the 3/31/00 on the line underneath. I would like to center both. Is this possible? Thanks
-
May 25th, 2000, 10:08 PM
#2
Lively Member
A normal textbox doesn't allow you to center text. You could use a richtextbox, though. Or if the user doesn't need to be able to change it, how about a label?
Toot
Some cause happiness wherever they go; others, whenever they go.
-
May 25th, 2000, 10:35 PM
#3
Actually, a regular textbox WILL let you center text, but ONLY if the Multiline property is set to true (if Multiline is False, then the Alignment property has no effect; the text is always aligned left). Toot's label suggestion is good if the user doesn't need to change the text. In response to your orignal question, you could do this:
set the Multiline property to True
set the Alignment property to Center
In code:
Text1.Text = "ACTUAL" & vbNewLine & "3/31/00"
-
May 29th, 2000, 10:01 PM
#4
Thread Starter
Addicted Member
Thanks! Got it to work using both methods.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|