Does RichTextBox support BorderStyle

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Locked
effadj
Posts: 2
Joined: Thu Jun 11, 2020 9:03 am
Location: United States

Does RichTextBox support BorderStyle

Post by effadj »

I am using a couple of 'RichTextBox' elements in my form. It seems that the BorderStyle, which defaults to 'Fixed3D', does not change when if I select 'FixedSingle'. I'm not sure if it's something I am not doing or it's a bug. Has anyone experience this?

Product: PowerShell Studio 2020 (64 Bit)
Build: v5.7.180
OS: Windows 10 Enterprise (64 Bit)
Build: v10.0.19041.0

User avatar
Alexander Riedel
Posts: 7556
Joined: Tue May 29, 2007 4:43 pm
Answers: 1
Been upvoted: 4 times

Re: Does RichTextBox support BorderStyle

Post by Alexander Riedel »

[Topic moved by moderator]
Alexander Riedel
SAPIEN Technologies, Inc.

jvierra
Posts: 14667
Joined: Tue May 22, 2007 9:57 am
Answers: 5
Has voted: 1 time
Been upvoted: 5 times
Contact:

Re: Does RichTextBox support BorderStyle

Post by jvierra »

The RichTextbox does not support "FixedSingle" This is noted in the documentation for the "BorderStyle" enum.

https://docs.microsoft.com/en-us/dotnet ... orderStyle

Always fully check the onl9ine documentation for controls when you have issues. Most PowerShell users would not know this but all developers of forms who are trained in forms development would know how to find this. The docs are useful but you must learn how to use them and practice. Once you learn this then the full capabilities of WinForms are available.

effadj
Posts: 2
Joined: Thu Jun 11, 2020 9:03 am
Location: United States

Re: Does RichTextBox support BorderStyle

Post by effadj »

Thanks for pointing that out. I did not catch the "Note" section and I think I was looking for a RichTextBox section on its own instead of just TextBox. My bad.

jvierra
Posts: 14667
Joined: Tue May 22, 2007 9:57 am
Answers: 5
Has voted: 1 time
Been upvoted: 5 times
Contact:

Re: Does RichTextBox support BorderStyle

Post by jvierra »

As I noted, you have to learn how to use docs. The path is from RB to its base TextBox to its base TextboxBase" to "BorderStyle" to the BorderStyle enum page. Once you understand this navigation then you can find all associated docs from the top down.

Locked