[lazarus] Implementation of TScrollBox in win32

Mattias Gaertner nc-gaertnma at netcologne.de
Sat Sep 27 05:49:31 EDT 2003


On Sat, 27 Sep 2003 01:32:27 -0300
Karl Brandt <pascalive at bol.com.br> wrote:

> Here's a patch that:
> 
> - Implements TScrollBox
>    Issues:
>    - TScrollingWinControl.ScrollBy does nothing more then call invalidate
>      So,as win32 doesn't scroll the control automatically, i had to
>      calculate the necessary amount of units to scroll and scroll the
>      window inside WM_HSCROLL/WM_VSCROLL.
>      Making ScrollBy intf dependant would avoid the duplicated code
>      (Calculating the new position)
>    - Win32 defines Maximum Position as (Range - (Page - 1)) while LCL de-
>      fines as Range. Setting values above the Maximum value doesn't have
>      effect. How gtk handles it? Is it a incompatibility or a bug?
>    - Inside TControlScrollBar.UpdateScrollBar there's a call to
>      SetScrollInfo passing FVisile as the Redraw parameter.
>      When Range is > FControl.Width/Height and visible = false, the
>      scrollbar is show but it doesn't Redraw after user click.
>      Under gtk is not noted because, if false the Scrollbar is hide.
>      Must the Redraw parameter (SetScrollInfo) used to Hide/Show The
>      Scroll?
> 
> -Code Clean Up
>     - Removed some Typecasts where the Type is previous know
>     - Commented useless code CreateComponent -> csImage
>     - Removed Hack to force use of DEFAULT_GUI_FONT (LCL already uses it)


Thanks. Applied.


Mattias






More information about the Lazarus mailing list