[lazarus] A Bug, a feature or am i just stupid (Dialog positions)

Tobi lazarus at bick-online.de
Sun Sep 28 09:22:45 EDT 2003


Hi,

im using Lazarus CVS(today, about 12:00) version and FPC 1.0.10.

I have a dialog (fsnormal, podefault, wsnormal,  bsdialog)
and i want to save the position of the window (left and top).
Saving is no problem, i use OnHide, OnClose and OnDestroy.
OnChangeBounds works till i hide - show the window. See below.

OnCreate:
	I restore Left and Top
	- looks like that the buttons, notebook, ... are placed somewhere
        - the window stays in podesign
          screenshot: http://www.bick-online.de/download/scr1.png

Override Create
	- restore old position - works fine

OnShow
	- restore last position
        - nothing happens
        - window stays on "Override create" position

OnActivate
	- use left:100, top:100
	- move to 200, 200
	- hide - show
		- you see the window comes back at 100, 100 and then moves to 200, 200
		- again hide -  show without moving
		- restore at 200, 200
	- move to 300, 300
		- the same. window comes at 200, 200 and ........

OnPaint
	- see OnActivate
	- but worse when you move the window. is it called when you move?

OnChangeBounds
	- i can see that left and top change
	- hide - show
		- looks like OnChangeBounds is called with
		  position from "Override create"
	- useless for me

So, what is it?
How to save - restore a window position?






More information about the Lazarus mailing list