|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Add a line break in label.textI am learning how to program using Visual Studio 2005 (I chose Visual Basic
to start). My question is: I have a sentence which I want to split in two. I would like half the sentence on the first line, and the other half right under it, on the second line. How can I accomplish this feat? P.S. Right now I can only get the label to show the sentence to me all on one line. -- Have a great day! Drew Leon "Drew Leon" <DrewL***@discussions.microsoft.com> schrieb: \\\> I have a sentence which I want to split in two. I would like half the > sentence on the first line, and the other half right under it, on the > second > line. How can I accomplish this feat? Me.Label1.Text = "Hello" & ControlChars.NewLine & "World" /// -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> Thank you very much Herfried. I spent the longest time trying to find the
answer to this question. -- Show quoteHide quoteHave a great day! Drew Leon "Herfried K. Wagner [MVP]" wrote: > "Drew Leon" <DrewL***@discussions.microsoft.com> schrieb: > > I have a sentence which I want to split in two. I would like half the > > sentence on the first line, and the other half right under it, on the > > second > > line. How can I accomplish this feat? > > \\\ > Me.Label1.Text = "Hello" & ControlChars.NewLine & "World" > /// > > -- > M S Herfried K. Wagner > M V P <URL:http://dotnet.mvps.org/> > V B <URL:http://classicvb.org/petition/> > > =?Utf-8?B?RHJldyBMZW9u?= <DrewL***@discussions.microsoft.com> wrote in
Show quoteHide quote news:9FDA5C03-1A71-40B9-966C-38F22587FC1D@microsoft.com: Label1.Text = "He thrusts his fists" & vbCrLf & "Against the Posts"> I am learning how to program using Visual Studio 2005 (I chose Visual > Basic to start). > > My question is: > > I have a sentence which I want to split in two. I would like half the > sentence on the first line, and the other half right under it, on the > second line. How can I accomplish this feat? > > P.S. Right now I can only get the label to show the sentence to me all > on one line. > ....which only works with explicitly entered text... If you wanted to wrap automatically following a given number of letters/words in a string variable, the coding would be a bit more complicated, I think. Probably beyond my current skill level. A simple Google search was sufficient to unearth this keyword... Karma, don't fail me now, The Confessor Thank you for your quick response. I was racking my head all morning
searching for the answer. Much appreciated. -- Show quoteHide quoteHave a great day! Drew Leon "Confessor" wrote: > =?Utf-8?B?RHJldyBMZW9u?= <DrewL***@discussions.microsoft.com> wrote in > news:9FDA5C03-1A71-40B9-966C-38F22587FC1D@microsoft.com: > > > I am learning how to program using Visual Studio 2005 (I chose Visual > > Basic to start). > > > > My question is: > > > > I have a sentence which I want to split in two. I would like half the > > sentence on the first line, and the other half right under it, on the > > second line. How can I accomplish this feat? > > > > P.S. Right now I can only get the label to show the sentence to me all > > on one line. > > > > Label1.Text = "He thrusts his fists" & vbCrLf & "Against the Posts" > > ....which only works with explicitly entered text... > > If you wanted to wrap automatically following a given number of > letters/words in a string variable, the coding would be a bit more > complicated, I think. Probably beyond my current skill level. A simple > Google search was sufficient to unearth this keyword... > > Karma, don't fail me now, > The Confessor >
Use of delegate
SetWindowsHookEx and VB.NET 2005 A Framework for Datadriven Forms for VB Dot Net XML Comments File Generated Byte Array, Datagrid Simple Example of How to Implement SerialPort Class populating text boxes... Help w/ 1st File Access Program Problem with setting focus ISO Date Functions |
|||||||||||||||||||||||