How to insert a paragraph?

I'm very new to VS.NET C#. I'm creating a simple app. to launch a flash tutorial. In the form, how do I insert a paragraphc explaining what this app. is going to be I tried the Lable control but it does not give me multi-line option. What do I need to use

Thanks!


Answer this question

How to insert a paragraph?

  • VitCon

    ahmedilyas wrote:

    multiline property is only available for the Textbox control.

    I've actually just tried to set a long piece of text on a Label control (with autosize = true) and it works, it does show the text in its full.

    I'm also using VS.NET pro 2005

    This is what I did for my test on a label:



    this.theLabel.Text = "this is just a small label to start out with and now..." + Environment.NewLine + "this sentence should be on a new line";

    does this not work for you



    I set the AutoSize to false and the multiline works. The problem is I do not want to always edit my texts from the Properties Window. I wonder if there is a way to edit the texts right on the Lable itself.

  • rajesh_batchu

    I got the lable control to work now. The AutoSize property need to be set to false.

    Again, thanks!

  • Krutika

    Many thanks for the help. The TextBox control works...but just curious about the Lable control. By default the AutoResize is set to True but still, I do not see the multiline available. I'm using VS.NET professional 2005.

  • pratap gaikwad

    ahmedilyas wrote:
    sorry how do you mean by the "property flyout" on the right


    I mean the Properties Window. Is there a way to edit my texts without going to the Properties Window and Text

  • csLearner

    Yes, that is what I need but the not way I like to approach it. I was looking for a way to edit the texts in design mode right on the Lable and not on the Property Window. If this option is not possible, I will have to use your method then.

    Thanks!

  • eddy2705

    multiline property is only available for the Textbox control.

    I've actually just tried to set a long piece of text on a Label control (with autosize = true) and it works, it does show the text in its full.

    I'm also using VS.NET pro 2005

    This is what I did for my test on a label:



    this.theLabel.Text = "this is just a small label to start out with and now..." + Environment.NewLine + "this sentence should be on a new line";

    does this not work for you



  • Dirk Reske

    Okay, one other question relating to Lable. How do I edit the text right on the form instead of on the Property fly-out on the right

  • NETLAND

    I see. So MS decided to make developers edit their texts on the Properties Window then. Imagine you have a whole paragraph, it's tedious and hard to edit the texts on the Text property. I guess I will have to use the code behind to edit the texts then.

    Thanks!

  • Cyberjunkie

    sorry how do you mean by the "property flyout" on the right

  • CSharpNewbie22

    As ahmedilyas has suggested, for editing more text, you can use a TextBox with Multiline set to true. It will look like a label if you adjust the BorderStyle, BackgroundColor, and ReadOnly properties. The important part is that you use the Lines property of the TextBox, which opens up a full multiline editor.

  • Abara6

    maybe you should set the autosize = true on the label if you have not already.

    you may also maybe wish to use a multiline textbox, setting it to readonly

    does this help



  • jayaraja

    well yes there is, just reset the Text property as I have done programmatically - is this not what you are after Sorry if I am not understanding correctly :-)

  • AndyL

    yes its not available unfortunately :-)

  • hoabinh

    I remember in VB6 how you could edit the text directly in the designer window. It was sometimes convenient, but more often then not I ended up double-clicking on the control and generating an event, instead of "slow double clicking". Editing the text in the properties window is the way it's done in .NET.

  • How to insert a paragraph?