TextBox + colour

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

    #1

    TextBox + colour

    Hi.
    I would like to ask, if it's possible make text in Classic TextBox control
    coloured. I think like in RichTextBox. One Part of text will have one color,
    second part text another color.

    Maybe I colud overload OnPaint method, but I don't know how.-
    Is on Internet any example.
    Thank you very much for answers.


  • Ken Tucker [MVP]

    #2
    Re: TextBox + colour

    Hi,

    You need to use the richtextbox.

    Ken
    --------------
    "Markk" <eknihy@szm.s k> wrote in message
    news:uG6BfzAVFH A.3532@TK2MSFTN GP09.phx.gbl...
    Hi.
    I would like to ask, if it's possible make text in Classic TextBox control
    coloured. I think like in RichTextBox. One Part of text will have one color,
    second part text another color.

    Maybe I colud overload OnPaint method, but I don't know how.-
    Is on Internet any example.
    Thank you very much for answers.



    Comment

    • Herfried K. Wagner [MVP]

      #3
      Re: TextBox + colour

      "Markk" <eknihy@szm.s k> schrieb:[color=blue]
      > I would like to ask, if it's possible make text in Classic TextBox control
      > coloured. I think like in RichTextBox. One Part of text will have one
      > color, second part text another color.[/color]

      The textbox control doesn' support that, that's why the richtextbox control
      exists. Is there any reason for not using the richtextbox control?

      --
      M S Herfried K. Wagner
      M V P <URL:http://dotnet.mvps.org/>
      V B <URL:http://classicvb.org/petition/>

      Comment

      • Markk

        #4
        Re: TextBox + colour

        Hi.
        I trying to use classic textbox, because I would like to make highlighting
        editor.
        and Richtext box is too slow when I want coloured many text.
        Or any Ideas How Can I make highlighting editor with RTB?
        I watch on SharpDevelop, but it's too complicated to understand for me.
        Thanks

        "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
        news:OVb9ReBVFH A.3240@TK2MSFTN GP10.phx.gbl...[color=blue]
        > "Markk" <eknihy@szm.s k> schrieb:[color=green]
        >> I would like to ask, if it's possible make text in Classic TextBox
        >> control coloured. I think like in RichTextBox. One Part of text will have
        >> one color, second part text another color.[/color]
        >
        > The textbox control doesn' support that, that's why the richtextbox
        > control exists. Is there any reason for not using the richtextbox
        > control?
        >
        > --
        > M S Herfried K. Wagner
        > M V P <URL:http://dotnet.mvps.org/>
        > V B <URL:http://classicvb.org/petition/>[/color]


        Comment

        • Supra

          #5
          Re: TextBox + colour


          this one is better in below



          Markk wrote:
          [color=blue]
          >Hi.
          >I trying to use classic textbox, because I would like to make highlighting
          >editor.
          >and Richtext box is too slow when I want coloured many text.
          >Or any Ideas How Can I make highlighting editor with RTB?
          >I watch on SharpDevelop, but it's too complicated to understand for me.
          >Thanks
          >
          >"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
          >news:OVb9ReBVF HA.3240@TK2MSFT NGP10.phx.gbl.. .
          >
          >[color=green]
          >>"Markk" <eknihy@szm.s k> schrieb:
          >>
          >>[color=darkred]
          >>>I would like to ask, if it's possible make text in Classic TextBox
          >>>control coloured. I think like in RichTextBox. One Part of text will have
          >>>one color, second part text another color.
          >>>
          >>>[/color]
          >>The textbox control doesn' support that, that's why the richtextbox
          >>control exists. Is there any reason for not using the richtextbox
          >>control?
          >>
          >>--
          >>M S Herfried K. Wagner
          >>M V P <URL:http://dotnet.mvps.org/>
          >>V B <URL:http://classicvb.org/petition/>
          >>
          >>[/color]
          >
          >
          >
          >[/color]

          Comment

          Working...