Sign in Join

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

Mailing lists / lazarus / 2008-07

LCL-fpGUI widget set help needed

5 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Graeme Geldenhuys

Hi,

I had a look at the LCL-fpGUI widgetset status and thought I would tackle the TButton implementation. I create a simple project using the Form Designer in Lazarus. The Form displays, but the components on the form doesn't.

1) My first thought was the the position of the components are wrong. I placed debug information in the TfpgWidget.HandleShow, which is called and the positions look correct.

2) I then thought maybe the Parent property is not correct or nil. I Added debug code in TFPGUIPrivateButton.CreateWidget(). I explicitly checked the result and class type of GetParentContainerWidget() call. It is correct and returns the TfpgForm.

I even debuged it with 'xwininfo -tree' and it shows the components are there and positions correctly.

Below is the output of my test program. Anybody got any clues what else I can check? I'm quickly running out of ideas. The components seem to be created correctly. There HandleShow gets called and The Form's paint method gets called.

The only thing I can see that is wrong (and vital) is that the TfpgButton.HandlePaint() is never called. Further investigation shows that the Paint Message which triggers HandlePaint() is never received by any of the components on the form. Only the Form itself seems to get that message. Any clues where LCL is stopping that? A plain fpGUI based application works fine, it's just the LCL-fpGUI based application that doesn't.

----------------------
graemeg at graemeg:t1$ ./test1
OnCreate
self.Visible := FALSE
Button has parent (TfpgForm)
Button has parent (TfpgForm)
OnShow
self.Visible := TRUE
BaseForm.Show
Widget.HandleShow - TfpgForm x:290 y:201 w:400 h:300 0... Widget.HandleShow - TfpgMenuBar x:0 y:0 w:16 h:21 1... Widget.HandleShow - TfpgButton x:29 y:40 w:75 h:25 2... Widget.HandleShow - TfpgEdit x:151 y:37 w:80 h:23 3... Widget.HandleShow - TfpgCheckBox x:178 y:75 w:110 h:24 4... Widget.HandleShow - TfpgRadioButton x:178 y:117 w:126 h:24 5... Widget.HandleShow - TfpgRadioButton x:178 y:157 w:126 h:24 6... Widget.HandleShow - TfpgButton x:54 y:179 w:75 h:25 BaseForm - MsgActivate
TfpgWidget.MsgPaint - TfpgForm
BaseForm.HandlePaint
----------------------

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Luiz Americo Pereira Camara
to Graeme Geldenhuys
Graeme Geldenhuys wrote 8 lines
The only thing I can see that is wrong (and vital) is that the TfpgButton.HandlePaint() is never called. Further investigation shows that the Paint Message which triggers HandlePaint() is never received by any of the components on the form. Only the Form itself seems to get that message. Any clues where LCL is stopping that? A plain fpGUI based application works fine, it's just the LCL-fpGUI based application that doesn't.

Somehow the child windows are no visible.

How do i know that?

I created a simple Form + Button project with lcl-fpgui. Examined the created application with WinInspector www.*windows*-*spy*.com/ The WS_VISIBLE flag is not set in styles property
Set WS_VISIBLE flag using "Edit Windows Styles" -> the child window appears and works as expected.

I hope this info helps.
Good luck.

Luiz

Reply by email

Luiz Americo Pereira Camara
to Luiz Americo Pereira Camara
Luiz Americo Pereira Camara wrote 15 lines
Graeme Geldenhuys wrote: > The only thing I can see that is wrong (and vital) is that the > TfpgButton.HandlePaint() is never called. Further investigation shows > that the Paint Message which triggers HandlePaint() is never received > by any of the components on the form. Only the Form itself seems to > get that message. Any clues where LCL is stopping that? A plain > fpGUI based application works fine, it's just the LCL-fpGUI based > application that doesn't. > > Somehow the child windows are no visible.

Simply FVisible is False for the child windows at the time of call to HandleShow

Luiz

Reply by email

Graeme Geldenhuys
to Luiz Americo Pereira Camara

2008/7/4 Luiz Americo Pereira Camara :

Show quoted text 5 lines
> > Somehow the child windows are no visible. Simply FVisible is False for the child windows at the time of call to HandleShow

Thanks for that. I'll try and find out what's happening in the LCL-fpGUI which prevents Visible = True.
I guess it must be some timing or event order issue.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Graeme Geldenhuys
to Luiz Americo Pereira Camara: Simply FVisible is False for the child windows at the time of call to HandleShow Luiz

2008/7/4 Luiz Americo Pereira Camara :

Show quoted text 5 lines
> > Somehow the child windows are no visible. Simply FVisible is False for the child windows at the time of call to HandleShow

Thanks for pointing me in the right direction. I managed to find and solve the issue. All supported components are now visible when the Form is displayed. :)

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email