Recent

Author Topic: TDBEdits won't work after setting form.Parent property  (Read 1341 times)

lmk

  • Newbie
  • Posts: 4
TDBEdits won't work after setting form.Parent property
« on: October 10, 2015, 02:10:17 pm »
Stumbled on a really weird problem in my project:

I'm trying to develop a MDI project.
Got a main form with formStyle := fsMDIForm.
Got a child form with formStyle := fsMDIChild.

On the main form, this is the code used to create and show the child (FormUsuario) form:

begin
  Application.CreateForm(TFormUsuario, FormUsuario);
  FormUsuario.Parent := FormMDI;
  FormUsuario.Show;
end; 

It works fine except for a pair of TDBEdits controls I got on the child form. I can't focus or type anything inside them (the field value is shown correctly though). In this child form I also have a grid which works correctly, so it's just something about the TDBEdits.

If I remove the ' FormUsuario.Parent := FormMDI;'  line in the form creation, these controls work just fine, but then the MDI behavior doesn't.

Any ideas for the reason behind this or how to get it to work properly?

Thanks in advance.

Cyrax

  • Hero Member
  • *****
  • Posts: 836
Re: TDBEdits won't work after setting form.Parent property
« Reply #1 on: October 10, 2015, 02:13:41 pm »
Currently, in Lazarus trunk, MDI only works with Qt and GTK(?) widgesets. Win32 isn't supported yet.

lmk

  • Newbie
  • Posts: 4
Re: TDBEdits won't work after setting form.Parent property
« Reply #2 on: October 10, 2015, 02:25:30 pm »
Well, that's unfortunate. Guess i'll change my design.

Thanks a lot for the quick answer  :)

 

TinyPortal © 2005-2018