views:

1035

answers:

2

For accessibility purposes, I need to make the scrollbars for all scrollable controls (lists, list views) wider and the scrollbar arrows bigger.

  1. How to get the scrollbars (handles) from a scrollable control (ex: TListView) ?

  2. How to make the scrollbar and the arrows wider/bigger ?

10x for any hints and code...

+1  A: 

I'm not sure that you can - You have to change it (and restore back) for whole Windows.

http://www.greatis.com/delphicb/tips/lib/system-captionfont.html

Setting and reading property TNonClientMetrics.iScrollWidth


Edit: I know that this solution is rude, but in common cases is the best that you CAN do. If you have specialized TabletPC application then you usually use only that application at one time, not others. But - almost all Windows applications are not designed to work with so big scroolbars. So when you need to use OS dialogs and other applications then you have to switch it back.

There is no better solution than "while is my touchscreen application running set Window scroolbars big, then return it back". We have exactly this application in real world so I know what I'm talking about.

Of course you can write your own grid control (if you have so much time) or use some thirdparty controls (if you have money and time), but that was not question.

DiGi
+5  A: 

Accessibility is something that does not concern a single application, but the whole system. That's why there is no API defined to adjust things like border widths, scrollbar size and similar properties of the native controls only for your program. You can however adjust these settings globally in Windows, either by using the Accessibility Wizard, or by adjusting fonts, colours, border sizes and scrollbar sizes in the Display Properties applet.

For more information you should check out the Microsoft Accessibility page and follow the various links.

Edit: Changing the global settings (as the accepted answer suggests) for the benefit of your own program is rude in the extreme. Please keep in mind that this interferes with all other running programs. It is maybe excusable for a system with a touch screen, where controls need to be large to be usable at all - but on such a system the control sizes would probably already be set correctly.

mghie
Voted up due to the edit. Changing system wide settings is for the system user, and not your program. Any application that changed a system-wide setting on my machine would end up in the Recycle Bin very quickly.
Ken White
@Ken: My sentiment exactly - I have not had this happen to me yet, but I would probably react in the same way.
mghie
...but for applications in real world it is not so bad. Single task TabletPC stations are typical target platform.
DiGi
"Applications in the real world"? What, you think I've spent the last 20 years writing applications for some fictional planet? <g> If it's truly a "single task" Tablet PC, fine. Show me a single "single task" PC of any kind. Truly single task only; never used for a game or email or anything else.
Ken White
"single task" PCs can be Information/Point of sale, touch screenswere often the OS if often hidden from the end user.esp. when a shop owner does not what the Clerks to be playing games or sending email etc
Christopher Chase
Almost every touch screen PC is only for single application. They are in shops (barcode readers,...) and in stores. They are not designed to use with "World of Goo" or other "must-have-on-tabletpc notebook" games :)
DiGi