简体   繁体   中英

RichTextBox Scroll bars not showing on some PCs

I am showing a form which i have a TabControl, and in the tabcontrol i have coded to add a richtextbox. The text shows fine and the scroll bars all work fine on my XP PC. When i run the program on Windows Server 2003 the text is displayed fine but no Scroll bars show.

I have set WordWrap = false and Multiline = True, and RichTextScrollbars = ForcedBoth.

What could be causing this and is there a way to resolve this ?

thanks All

Based on your comment regarding different font sizes, it looks like you are dealing with an accessibility issue.

From http://www.44342.com/csharp-f73-t32102-p1.htm :

You can override the WndProc method and listen to the message stream directly or simply register the form's SystemColorsChanged event.It's fired whenever a user changes a display property. The documentation is a little lacking on this event, but it handles colors, fonts, resolutions, etc.

This may also work: How to use system font settings for a Windows C# app

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM