Sign in Join

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

Mailing lists / lazarus / 2003-08

Object inspector edit/combobox

5 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Mattias Gaertner
to Micha Nelissen: Why the following code? ValueEdit.Parent:=Parent; ValueComboBox.Parent:=Parent;…
Show quoted text 32 lines
Mattias Gaertner wrote: > On Tue, 26 Aug 2003 17:02:16 +0200 > Micha Nelissen wrote: > > >>Hi, >> >>Why the following code? >> >> ValueEdit.Parent:=Parent; >> ValueComboBox.Parent:=Parent; >> ValueButton.Parent:=Parent; >> >>Why not set the parent of these controls to the eventgrid/propertygrid >>which is much more logical IMHO. If the eventgrid and it's valueedit >>have the same parent, they're fighting for the z-order, while the >>valueedit should be on top, no? > > debugging, I think, we should keep it robust and basic (as all general > IDE parts), so that any new interface will find it easier to get the IDE > running. > The OI creates the grids before the edit controls, so that the grids > should ly below them. If the win32 intf is not able to keep the z order, > then I wonder how the VCL achieves it. > Maybe something is recreating the grid handle? Some time ago, the edit worked, but the combobox did not. It did appear, but when it disappeared it was gone for good. The window handle was destroyed and it did not come back. I changed the parent of the combobox to be the grid itself and that worked nicely, so I thought: why would you not want it like this.

Just to avoid misunderstandings:
I want it. My idea was the following: Every gui supports a z-order and every new intf will have it from the beginning. OTOH implementing a custom control with client area, child controls and scrollbars can be tricky. So, I assumed the current trick as easier to get things going.
Of course we can add an interface function to ask what to use.

However: with current cvs it does seem to work; the combobox does appear, and keeps doing so, so it probably was another bug.

I think, we need more examples. The next interface will then be easier to implement. We can create a sub directory example/interfacetests for it. Every test example is welcome.

Mattias

Reply by email

Micha Nelissen
to Micha Nelissen: Why the following code? ValueEdit.Parent:=Parent; ValueComboBox.Parent:=Parent;…
Mattias Gaertner wrote 24 lines
On Tue, 26 Aug 2003 17:02:16 +0200 Micha Nelissen wrote: >Hi, > >Why the following code? > > ValueEdit.Parent:=Parent; > ValueComboBox.Parent:=Parent; > ValueButton.Parent:=Parent; > >Why not set the parent of these controls to the eventgrid/propertygrid >which is much more logical IMHO. If the eventgrid and it's valueedit >have the same parent, they're fighting for the z-order, while the >valueedit should be on top, no? debugging, I think, we should keep it robust and basic (as all general IDE parts), so that any new interface will find it easier to get the IDE running. The OI creates the grids before the edit controls, so that the grids should ly below them. If the win32 intf is not able to keep the z order, then I wonder how the VCL achieves it. Maybe something is recreating the grid handle?

Some time ago, the edit worked, but the combobox did not. It did appear, but when it disappeared it was gone for good. The window handle was destroyed and it did not come back. I changed the parent of the combobox to be the grid itself and that worked nicely, so I thought: why would you not want it like this. However: with current cvs it does seem to work; the combobox does appear, and keeps doing so, so it probably was another bug.

Regards,

Micha.

Reply by email

Micha Nelissen

Hi,

Why the following code?

     ValueEdit.Parent:=Parent;
     ValueComboBox.Parent:=Parent;
     ValueButton.Parent:=Parent;

Why not set the parent of these controls to the eventgrid/propertygrid which is much more logical IMHO. If the eventgrid and it's valueedit have the same parent, they're fighting for the z-order, while the valueedit should be on top, no?

Regards,

Micha.

Reply by email

Karl Brandt
to Micha Nelissen
Micha Nelissen wrote 8 lines
Some time ago, the edit worked, but the combobox did not. It did appear, but when it disappeared it was gone for good. The window handle was destroyed and it did not come back. I changed the parent of the combobox to be the grid itself and that worked nicely, so I thought: why would you not want it like this. However: with current cvs it does seem to work; the combobox does appear, and keeps doing so, so it probably was another bug.

There was two problems: Text property and events of TComboBox were not working.

Now these are fixed.

karl

Reply by email

Mattias Gaertner
to Micha Nelissen: Why the following code? ValueEdit.Parent:=Parent; ValueComboBox.Parent:=Parent;…
Show quoted text 12 lines
Hi, Why the following code? ValueEdit.Parent:=Parent; ValueComboBox.Parent:=Parent; ValueButton.Parent:=Parent; Why not set the parent of these controls to the eventgrid/propertygrid which is much more logical IMHO. If the eventgrid and it's valueedit have the same parent, they're fighting for the z-order, while the valueedit should be on top, no?

The Object Inspector is an old control, dating from times, where the LCL was very buggy and only the very basic properties worked. In this case: Not long ago a TCustomControl was not able to hold childs in the gtk-intf. Because the object inspector is a standalone control, that can be used for debugging, I think, we should keep it robust and basic (as all general IDE parts), so that any new interface will find it easier to get the IDE running.
The OI creates the grids before the edit controls, so that the grids should ly below them. If the win32 intf is not able to keep the z order, then I wonder how the VCL achieves it.
Maybe something is recreating the grid handle?

Mattias

Reply by email