• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 196
  • Last Modified:

TEXT BOX Q

This is the content of my button
TextDisplay.Text = "welcome"
TextDisplay.Text = "blah blah blah"

however doing it this way it will only read into the text box the second line
1. How can I word wrap a sentece
And print more than one line within my text box
0
michaeldi
Asked:
michaeldi
  • 3
  • 3
1 Solution
 
mark2150Commented:
TextDisplay.Text = "welcome"
TextDisplay.Text = TextDisplay.Text & vbcrlf & "blah blah blah"

Be sure that .Multiline is true

M
0
 
mark2150Commented:
Wrapping happens automatically.

M
0
 
michaeldiAuthor Commented:
sorry yes you are right it does word wrap if you put it all in one line however on this for example

Private Sub Form_Load()
TextDisplay.Text = "                             WELCOME"
TextDisplay.Text = "    sffms;vmsffsdfsdfsdfsdfs;vm;sfdmv;sfmv;dfm;vmdf;mdf"
End Sub

it will only display the second line not the first.
yes mutiline is set to TRUE
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
michaeldiAuthor Commented:
sorry i did not see you last coment yes thank is there a way to centre
the first line
and that should be me done
thanks
0
 
mark2150Commented:
Did you see the change I made to your code in my first comment?

No. There is no easy way to center text on a regular text box.

If you want to do fancy, use a RichTextBox and you can easily center, change fonts/colors, etc.

Go to my web page and grab a copy of What2Do. It is a simple calendaring app that includes SOURCE CODE that shows how to make a little editor using a RichTextBox.

Visit: www.cyberchute.com/rvbus/madmark

M
0
 
michaeldiAuthor Commented:
Thankyou
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now