|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Newbie: Textbox text from stringIf I were to set textbox text from a string, as such:
dim myString as string = "Hello" textbox1.text = myString It of course works. But what is the rule concerning new lines, for instance, the following: dim myString as string = "Hello" & chr(10) & "Goodbye" textbox1.text = myString Then both are displayed on the same line even though: msgbox(myString) would show them on different lines. How do I get example two to show them on different lines? Thanks Dim myString As String = "Hello" & ControlChars.CrLf & "World"
Robin S. -------------------------------- Show quoteHide quote "Jarry" <HarryandJa***@gmail.com> wrote in message news:1163195786.368154.78290@b28g2000cwb.googlegroups.com... > If I were to set textbox text from a string, as such: > dim myString as string = "Hello" > textbox1.text = myString > It of course works. But what is the rule concerning new lines, for > instance, the following: > dim myString as string = "Hello" & chr(10) & "Goodbye" > textbox1.text = myString > Then both are displayed on the same line even though: > msgbox(myString) > would show them on different lines. How do I get example two to show > them on different lines? > > Thanks > Change the Multiline property of the textbox to True.
Show quoteHide quote On 10 Nov 2006 13:56:26 -0800, "Jarry" <HarryandJa***@gmail.com> wrote: >If I were to set textbox text from a string, as such: > dim myString as string = "Hello" > textbox1.text = myString >It of course works. But what is the rule concerning new lines, for >instance, the following: > dim myString as string = "Hello" & chr(10) & "Goodbye" > textbox1.text = myString >Then both are displayed on the same line even though: > msgbox(myString) >would show them on different lines. How do I get example two to show >them on different lines? > >Thanks
Location for shared Access database
Make copy of arraylist Clipboard Question Getting the current procedure name? newbie: is this the appropriate use of a class? Newbie: Event with Control Array TItem, TData, etc? Generics VB.Net XML Comments and Intellisense for COM? Printign data over form AUTOMATIC FONTS |
|||||||||||||||||||||||