2006. április 23., vasárnap

Detect if the scrollbars of a TStringGrid are visible


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 }

Nincsenek megjegyzések:

Megjegyzés küldése