[lazarus] Implementation of TScrollBox in win32

Karl Brandt pascalive at bol.com.br
Sat Sep 27 00:29:08 EDT 2003


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)



karl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: zip00039.zip
Type: application/octet-stream
Size: 5118 bytes
Desc: "scroll.zip"
Url : http://localhost/pipermail/lazarus/attachments/20030927/de4ad559/zip00039.obj


More information about the Lazarus mailing list