views:

2121

answers:

2

I'm using Delphi 2007 for Win32 and need to set the vertical scrollbar in TstringGrid to always be visible. How do you do that?

+2  A: 

There is a scrollbar property that can be set to ssNone, ssHorizontal, ssVertical or ssBoth.

Gamecat
Neither of which will "set the vertical scrollbar in TstringGrid to always be visible", as the question clearly states.
mghie
+4  A: 

You can hide scrollbars with the Scrollbar property set to either ssNone, ssHorizontal, ssVertical, even when the number of rows and / or columns would normally make them appear.

You can however not force one or both scrollbars to be always visible but disabled, without creating a new descendent class and overriding methods. Unfortunately the standard grid controls have not evolved much since the days of Delphi 1, so your best bet is using some third party grid control instead. Preferably one that does also show proper proportional scroll thumbs.

mghie
@Renee: if you accept this answer, it is appropriate to click the "Accept" check mark (so mghie gets credit for it).
Argalatyr