Spiel79 Posted February 12, 2004 Posted February 12, 2004 Hi everyone. Is it possible to have multiline property on a label? I need to type a few lines of text on a label, but cant seem to navigate between lines. For textboxes, you just set Multiline to True and when u press enter, it goes to the next line. Is there any equivalent way of doing this when dealing with a label? Thanks. Quote
samsmithnz Posted February 12, 2004 Posted February 12, 2004 If I need to do this I either use multiple labels or carriage returns embedded in my text. Quote Thanks Sam http://www.samsmith.co.nz
I Schobert Posted February 12, 2004 Posted February 12, 2004 You could also use a textbox and mimik it's layout to resemble that of a label. That is easy enough... Any issues with that solution? Quote IS
samsmithnz Posted February 12, 2004 Posted February 12, 2004 You could also use a textbox and mimik it's layout to resemble that of a label. That is easy enough... Any issues with that solution? Except that when you do this, you get a scroll bar on the side... Quote Thanks Sam http://www.samsmith.co.nz
I Schobert Posted February 12, 2004 Posted February 12, 2004 Sam, A Textbox control has a Multiline property and a seperate ScrollBars property. You were probably thinking of a RichTextBox that, by default, has ScrollBars = True (but this could be changed as well). A textbox will require to set Multiline = True, but it has already a default of ScrollBars = False, so no change would be required. The problem that I can see would be the fact that, if your text is longer than the available space in the control, you would see only a portion of it. But, multiple labels or carriage returns would conclude in the same issue. Too much is too much :) Agree? Quote IS
samsmithnz Posted February 12, 2004 Posted February 12, 2004 Sam, A Textbox control has a Multiline property and a seperate ScrollBars property. Sorry you're right, I was confusing it with the ASP.NET textbox :p. Quote Thanks Sam http://www.samsmith.co.nz
Spiel79 Posted February 13, 2004 Author Posted February 13, 2004 Thanks to everyone who replied. I did manage to work it out using the textbox with layout changed method. Thanks for that Schobert. :) Quote
I Schobert Posted February 13, 2004 Posted February 13, 2004 You are very welcome Spiel79 :D Quote IS
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.