Mirror

Detect if the scrollbars of a TStringGrid are visible (Views: 101)


Problem/Question/Abstract:

I have a TStringGrid on my form and enabled the horizontal scrollbar. This only appears when there are more cols than fit on the scroll. When it appears it covers the row at the bottom. I need to have one less row when it is shown. I cannot enable the vertical scrollbar. How do I test if it is visible?

Answer:

{ ... }
if (GetWindowLong(stringgrid.handle, GWL_STYLE) and WS_HSCROLL) <> 0 then
  { ... scrollbar is visible }

<< Back to main page