Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-09

Implementation of TScrollBox in win32

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Karl Brandt

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

Reply by email

Mattias Gaertner
to Karl Brandt
Show quoted text 25 lines
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

Reply by email

Mattias Gaertner
to Karl Brandt: Here's a patch that: - Implements TScrollBox Issues: - TScrollingWinControl.ScrollBy does…
Show quoted text 12 lines
Hello: I have a proyect that it run ok the last week, but when I have updated Lazarus from CVS today, these errors are showing when lazarus loads the proyect: Error 1: Error reading Form Component Class: TSTRINGGRID Error while reading Stringgrid1.HORZSCROLLBAR.PAGE: unknown property [...] Are there any change in Lazarus that I do not know?

Yes.
I applied the new grid.pas from Jesus last week. Here is the log:

+++++++++++++++++++++++++
VERSION: 0.8.5:
----------------
Date: 15-Sept-2003
- TCustomGrid is derived from TCustomControl instead of TScrollingWinControl means that:
* No more transparent grid at design time
* No more HorzScrolLBar and VertScrollbar in Object inspector
* HorzScrollbar and VertScrollbar doesn't exists anymore
* Scrollbar is handled with setscrollinfo or through the new ScrollbarXXXX protected methods.
- TDrawGrid attribute support was removed and added to a new TStringGrid derivated
component.
- Removed CanSelect, OnCanSelect, TOnCanSelectEvent now it uses SelectCell OnSelectCell and TOnSelectCell.
- Implemented Auto edit mode (Typing something will show editor)
- Implemented EditorMode
+++++++++++++++++++++++++

Just open the lfm file in a text editor of your choice and remove the HorzScrollbar and VertScrollbar.

Eventually the IDE will have a wizard to fix broken lfm files. I already started some parts in parts in the FCL, but I didn't had the time to start the wizard.

Mattias

Reply by email

Manuel Pérez López
to Karl Brandt: Here's a patch that: - Implements TScrollBox Issues: - TScrollingWinControl.ScrollBy does…

Hello:

I have a proyect that it run ok the last week, but when I have updated Lazarus from CVS today, these errors are showing when lazarus loads the proyect:

Error 1: Error reading Form
Component Class: TSTRINGGRID
Error while reading Stringgrid1.HORZSCROLLBAR.PAGE: unknown property

Error 2: Error reading Form
Component Class: TSTRINGGRID
Error while reading Stringgrid1.HORZSCROLLBAR.RANGE: unknown property

Error 3: Error reading Form
Component Class: TSTRINGGRID
Error while reading Stringgrid1.VERTSCROLLBAR.PAGE: unknown property

Error 4: Error reading Form
Component Class: TSTRINGGRID
Error while reading Stringgrid1.VERTSCROLLBAR.RANGE: unknown property

Are there any change in Lazarus that I do not know?

Thanks

--------------------------------
Cordiales saludos
Manuel P�rez L�pez

http://www.ieduca.net/

Si es vd. usuario de Outlook, tiene prohibido
a�adirme a su libreta de direcciones

Reply by email