How to make label and linklabel controls to accept multilined text at design time?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • M Shafaat

    How to make label and linklabel controls to accept multilined text at design time?

    Hi!
    How can I make label, linklabel . controls to accept multilined text at
    design time and in the properties window of Visual Studio?


    Regards
    M Shafaat



  • Adrian

    #2
    Re: How to make label and linklabel controls to accept multilined text at design time?

    "M Shafaat" <poppy@comhem.s e> wrote in message
    news:2mKUd.1315 72$dP1.470506@n ewsc.telia.net. ..[color=blue]
    > Hi!
    > How can I make label, linklabel . controls to accept multilined text at
    > design time and in the properties window of Visual Studio?
    >
    >
    > Regards
    > M Shafaat
    >
    >
    >[/color]
    Unless I am nuts, the size of the label
    determines how much text you can get in.


    Comment

    • M Shafaat

      #3
      Re: How to make label and linklabel controls to accept multilined text at design time?

      Yes, but then it wraps the text showing it in several lines. But What I want
      to do is inserting line breaks at the places I decide, not the control
      decides.

      Regards
      M Shafaat
      "Adrian" <xxx@xxx.xx> wrote in message
      news:7c6a4$4223 7ea8$3e159e4c$1 6403@freeler.nl ...[color=blue]
      > "M Shafaat" <poppy@comhem.s e> wrote in message
      > news:2mKUd.1315 72$dP1.470506@n ewsc.telia.net. ..[color=green]
      >> Hi!
      >> How can I make label, linklabel . controls to accept multilined text at
      >> design time and in the properties window of Visual Studio?
      >>
      >>
      >> Regards
      >> M Shafaat
      >>
      >>
      >>[/color]
      > Unless I am nuts, the size of the label
      > determines how much text you can get in.
      >
      >[/color]


      Comment

      • Tim Wilson

        #4
        Re: How to make label and linklabel controls to accept multilined text at design time?

        I don't know of a "built-in" way of doing this. However, it's not pretty,
        but one way to do this is by manually adding a new line ("\n") to the
        property value string through the code that is generated in the
        InitializeCompo nent() method. Then you will "see" the new line within the
        property value in the Properties window as a small black block. When you
        want to insert a new line in text for another control, simply copy the small
        black block and paste it in the appropriate location.

        --
        Tim Wilson
        ..Net Compact Framework MVP

        "M Shafaat" <poppy@comhem.s e> wrote in message
        news:h%LUd.1315 81$dP1.470513@n ewsc.telia.net. ..[color=blue]
        > Yes, but then it wraps the text showing it in several lines. But What I[/color]
        want[color=blue]
        > to do is inserting line breaks at the places I decide, not the control
        > decides.
        >
        > Regards
        > M Shafaat
        > "Adrian" <xxx@xxx.xx> wrote in message
        > news:7c6a4$4223 7ea8$3e159e4c$1 6403@freeler.nl ...[color=green]
        > > "M Shafaat" <poppy@comhem.s e> wrote in message
        > > news:2mKUd.1315 72$dP1.470506@n ewsc.telia.net. ..[color=darkred]
        > >> Hi!
        > >> How can I make label, linklabel . controls to accept multilined text at
        > >> design time and in the properties window of Visual Studio?
        > >>
        > >>
        > >> Regards
        > >> M Shafaat
        > >>
        > >>
        > >>[/color]
        > > Unless I am nuts, the size of the label
        > > determines how much text you can get in.
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • M Shafaat

          #5
          Re: How to make label and linklabel controls to accept multilined text at design time?

          Thank you Tim, that seems to be a good way.
          I tested it on a test control and then copied the result from the design
          property window and pasted it into the Text property of another control and
          it worked.

          This way (by first using a test or temporary control) you don't need to
          touch the code automatically generated for your non-test-control which is
          not to be modified manually.

          Regards
          M Shafaat


          "Tim Wilson" <TIM(UNDERSCORE )WILSON(AT)ROGE RS(PERIOD)COM> wrote in message
          news:OEiSrBeHFH A.1176@TK2MSFTN GP10.phx.gbl...[color=blue]
          >I don't know of a "built-in" way of doing this. However, it's not pretty,
          > but one way to do this is by manually adding a new line ("\n") to the
          > property value string through the code that is generated in the
          > InitializeCompo nent() method. Then you will "see" the new line within the
          > property value in the Properties window as a small black block. When you
          > want to insert a new line in text for another control, simply copy the
          > small
          > black block and paste it in the appropriate location.
          >
          > --
          > Tim Wilson
          > .Net Compact Framework MVP
          >[/color]


          Comment

          Working...