[lazarus] Problem with filedialog

Shane Miller SMiller1 at stvgb.org
Mon Feb 28 11:37:17 EST 2000


I have to change TFIledialog.  The problem with it is the following:

TCustomDialog.Execute ccreates the widget.
Call DoExecute
TFileDialog.DoExecute sets some parameters and calls the inherited DoExecute (TCustomDialog's)
TCustomDialog.DoExecute does a SHOWMODAL then Application.Processmessages until FUserChoice changes.
TCustomExecute Destroys the widget.

Destruction of the widget causes the FILENAME property to be blank when I access it (I'm not totally clear why).
In the callback for the OK button, could I simply hide the widget there?  That way I co do this in Execute.

If FHandle = 0 then
SendMessage(LM_CREATE,Self,nil);
and leave out the destroy.  The widget will be destroyed once the application exits.  The SHOWMODAL will cause the widget to appear and the HIDE in gtkDialogOKClickedcb() callback would hide it.  I would also add this hide to the CANCELClicked in the callback unit.

Any thoughts?
Shane


>>> mbukovjan at netscape.net 02/28/00 01:58AM >>>
Marc Weustink <weus at quicknet.nl> wrote:
> At 22:34 26-02-2000 -0600, you wrote:

This will be the case. I recently changed the code to not fire WM_SIZE
messages if WM_WINDOWPOSCHANGED is handled, which is always. I suggest either
moving the line setting code into this message, or maybe should the WM_SIZE
message be fired after all?

Michal Bukovjan


____________________________________________________________________
Get your own FREE, personal Netscape WebMail account today at http://webmail.netscape.com.

_________________________________________________________________
     To unsubscribe: mail lazarus-request at miraclec.com with
                "unsubscribe" as the Subject
    archives at http://www.miraclec.com/list_archives/lazarus






More information about the Lazarus mailing list