skip to Main Content

How can I Fill part of background color in Textbox C# Winforms.
Like this (this example create in Photoshop):

enter image description here

Can anyone help me…

5

Answers


  1. You should handle the Paint event, then perform your custom drawing in the event handler.

    Login or Signup to reply.
  2. Crate a custom control, use group box with border, set its background, place a text box in it, set its border to none. You can create same as you wish.

    Login or Signup to reply.
  3. You can increase and set color left border width in

    Edit UI Elements > BorderPrimitive > Box

    but be carefull that

    set BoxStyle to FourBorders

    Login or Signup to reply.
  4. You could also use panels. Paint the background of the panels the color of your liking. Place them on top of each other. Or you could use a picture as background.

    Login or Signup to reply.
  5. In the Properties of the textbox you can change the backcolor under the following setting. http://prntscr.com/3hjyhl

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search