Sign in Join

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

Mailing lists / lazarus / 2009-06

All edit+button components have issues with alignment

8 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Graeme Geldenhuys

Hi,

Is this by design or a bug? I experienced the same problem when I tried to improve the component alignment in the IDE Build Dialog. Any component that include a button: TDateEdit, TFileNameEdit, TDirectoryEdit, ... has this problem.

* In the form designer, the button part is not selected when you click and resize the component.

* You can never achieve the green alignment line on the right side of the components, because the button part is not part of the selected component.

* When you do alignment to other components, the button part is not taken into account, so you cannot use the advanced alignment options.

See the attached screenshot which highlights both problems? Must I report this as a bug in Mantis? I'm using the latest trunk revision.

Regards,
- Graeme -

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: screenshot.png
Type: image/png
Size: 13173 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20090626/69189eff/attachment-0001.png>

Reply by email

Hans-Peter Diettrich
to Graeme Geldenhuys
Is this by design or a bug? I experienced the same problem when I tried to improve the component alignment in the IDE Build Dialog. Any component that include a button: TDateEdit, TFileNameEdit, TDirectoryEdit, ... has this problem.

I also experienced problems with TToolButtons. When a form is docked, the toolbuttons do not retain their size. This happens with win32, not with gtk2. Maybe a related problem?

DoDi

Reply by email

Mattias Gärtner
to Graeme Geldenhuys: Is this by design or a bug? I experienced the same problem when I tried to improve the…

Zitat von Graeme Geldenhuys :

Show quoted text 20 lines
Hi, Is this by design or a bug? I experienced the same problem when I tried to improve the component alignment in the IDE Build Dialog. Any component that include a button: TDateEdit, TFileNameEdit, TDirectoryEdit, ... has this problem. * In the form designer, the button part is not selected when you click and resize the component. * You can never achieve the green alignment line on the right side of the components, because the button part is not part of the selected component. * When you do alignment to other components, the button part is not taken into account, so you cannot use the advanced alignment options. See the attached screenshot which highlights both problems? Must I report this as a bug in Mantis? I'm using the latest trunk revision.

Put TDateEdit into a TPanel.

Mattias

Powered by NetMail

Reply by email

Graeme Geldenhuys
to Hans-Peter Diettrich: I also experienced problems with TToolButtons. When a form is docked, the toolbuttons do…
Hans-Peter Diettrich wrote
Maybe a related problem?

I'm not sure. My issue is in the Form Designer, when I try and align those components with other components (auto setting the width property).

Regards,
- Graeme -

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

Reply by email

Mattias Gärtner
to Hans-Peter Diettrich: I also experienced problems with TToolButtons. When a form is docked, the toolbuttons do…

Zitat von Hans-Peter Diettrich :

Show quoted text 10 lines
Graeme Geldenhuys schrieb: > Is this by design or a bug? I experienced the same problem when I tried > to improve the component alignment in the IDE Build Dialog. Any > component that include a button: TDateEdit, TFileNameEdit, > TDirectoryEdit, ... has this problem. I also experienced problems with TToolButtons. When a form is docked, the toolbuttons do not retain their size. This happens with win32, not with gtk2. Maybe a related problem?

Unlikely.
TDateEdit are two controls, but Graeme wants to align/anchor them as one. When TDateEdit was written the LCL autosizing was not as flexible as it is nowadays.
Maybe it is time to rewrite TDateEdit and friends using a TCustomPanel.

Please create an example/bug report for the tool buttons.

Mattias

Powered by NetMail

Reply by email

Graeme Geldenhuys
to Mattias Gärtner: Zitat von Graeme Geldenhuys : Put TDateEdit into a TPanel. Mattias Powered by NetMail
Mattias G?rtner wrote
Put TDateEdit into a TPanel.

Surely that is not the recommended usage for *all* button edit based components? If so, why not simply fix the component to have an embedded panel (as you suggest) without the developer having to do that manually. Resource count would be the same either way, but the latter would be much easier to work with. Or fix the Form Designer, to take the button into account when it shows the grab handles or does width alignment against other components.

So is this going to be an issue with all composite based components? For example, in tiOPF there are some custom GUI components that are all composite components. Meaning, it is a few components working together as one: Double selection listbox, advanced date range which uses radio buttons as well, etc... So alignment or selection in Form Designer will fail on all those, unless I manually embed them in another TPanel. Sounds more like a bug in Lazarus, because Delphi's Form Designer handles composite components as one large component.

Regards,
- Graeme -

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

Reply by email

Mattias Gärtner
to Graeme Geldenhuys

Zitat von Graeme Geldenhuys :

Show quoted text 21 lines
Mattias G?rtner wrote: > > Put TDateEdit into a TPanel. Surely that is not the recommended usage for *all* button edit based components? If so, why not simply fix the component to have an embedded panel (as you suggest) without the developer having to do that manually. Resource count would be the same either way, but the latter would be much easier to work with. Or fix the Form Designer, to take the button into account when it shows the grab handles or does width alignment against other components. So is this going to be an issue with all composite based components? For example, in tiOPF there are some custom GUI components that are all composite components. Meaning, it is a few components working together as one: Double selection listbox, advanced date range which uses radio buttons as well, etc... So alignment or selection in Form Designer will fail on all those, unless I manually embed them in another TPanel. Sounds more like a bug in Lazarus, because Delphi's Form Designer handles composite components as one large component.

The designer just shows what is there. TDateEdit is currently two controls. Patches are welcome to make it a true composite control. A bug report is welcome too.

Mattias

Powered by NetMail

Reply by email