Results 1 to 3 of 3

Thread: Can't seem to change BorderStyle for TextBox, RichTextBox - bug in VS?

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2017
    Location
    UK, France, Belgium, Ireland
    Posts
    34

    Can't seem to change BorderStyle for TextBox, RichTextBox - bug in VS?

    For TextBoxes and RichTextBoxes, the BorderStyle property can be set to None, FixedSingle, or Fixed3D.

    However, TextBoxes seem to only display as either None, or FixedSingle. (Fixed3D is displayed as FixedSingle.)

    And RichTextBoxes seem to only display as either None, or Fixed3D. (FixedSingle is displayed as Fixed3D.)

    So I can't show RichTextBoxes with a FixedSingle border (my preference).

    Am I missing something, or is there a bug? If a bug, not a big problem, it's just slightly annoying that I can't have my TextBoxes and RichTextBoxes looking the same. (I could just set RichTextBoxes' BorderStyle = None, and draw a rectangle round them, but that's a bit too much faff.)

    Am using VB.NET in VS 2017, on Windows 10.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,302

    Re: Can't seem to change BorderStyle for TextBox, RichTextBox - bug in VS?

    With regards to the TextBox, that's the OS. Windows 10 has a flat style by default so it's interpretation of a 3D border looks flat. If you run your app on Windows 7 then you'll see a 3D border for the TextBox.

    For the RichTextBox, it's actually an old Win32 control wrapped in a .NET class and it doesn't have a flat border representation that I'm aware of.

  3. #3
    Hyperactive Member
    Join Date
    Aug 2017
    Location
    Nigeria
    Posts
    257

    Re: Can't seem to change BorderStyle for TextBox, RichTextBox - bug in VS?

    What actually do you want to use the textbox for? if it is a readonly property then why not make it a label and then change its border style to whatever you want?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width