[lazarus] Implementation of TScrollBox in win32
pascalive at bol.com.br
Sat Sep 27 00:29:08 EDT 2003
Here's a patch that:
- Implements TScrollBox
- 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
-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)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5118 bytes
Url : http://localhost/pipermail/lazarus/attachments/20030927/de4ad559/zip00039.obj
More information about the Lazarus