Link to home
Start Free TrialLog in
Avatar of heretoread
heretoread

asked on

is scrollbar enabled.

I have a TRichEdit with the ScrollBars property set to ssBoth, but i need a way to check if the scroll bar is enabled.
Avatar of wildzero
wildzero

By enabled you mean, is showing up? (ie the user has lots of text in the box?)
Avatar of heretoread

ASKER

yes, is it currently active.

i need this because if a user resizes the form the richedit is also resized to stay in proportion, but if the scroll bar is active and the form was resized quick, GetScrollPos() will not always return 0.

so my aim is to make a function like

function ScrollPos:Integer;
begin
  if Active then
    //Scrollpos result
  else
    Result:= 0;
end;
ASKER CERTIFIED SOLUTION
Avatar of pcsentinel
pcsentinel

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks, That was half what i needed, tho i changed STATE_SYSTEM_INVISIBLE to STATE_SYSTEM_UNAVAILABLE.