[Lazarus] Lazarus and Windows 7

Hans-Peter Diettrich DrDiettrich1 at aol.com
Sat Aug 15 16:27:18 CEST 2009


Graeme Geldenhuys schrieb:

>> Indeed. We are mostly testing with english version. There captions 
>> fits fine into designed width.
> 
> And the same issue appears for Afrikaans language as well. I've said it 
> before and I'll say it again. All modern GUI toolkits support layout 
> managers. These layout managers query each component and asks for the 
> preferred size and minimum size. Minimum size from all components will 
> dictate the minimum size of the dialog or form, so no clipping ever occurs.

The results only look nice when the forms have according flexible 
layouts. In many cases it's not sufficient to only increase the size of 
a single control, and to move following controls to the right. Such a 
change should be reflected in *all* controls of the same "table". This 
requires that all related controls are grouped properly, by placing them 
into (kind of) VBox/HBox containers, or by anchoring.

In this context I really dislike the Lazarus anchored layout, because it 
does not enforce a systematic "regular" layout. When controls are added 
to a VBox/HBox, they are automatically alligned according to their 
container. Anchors instead have to be set individually for every 
control, with good chances for omissions, and without any chance of a 
quick (visual) verification of the existing dependencies.


> VCL is very outdated in this regard.

I dare to disagree. Using the appropriate containers (panels, probably 
invisible) and anchors allows for the construction of very "elastic" 
layouts, which can be verified by changing the form's size at design time.

> LCL is slightly better with more 
> advanced alignment and sizing options, but a full layout manager support 
> is still missing.

The LCL anchors *allow* for more flexibility, but their use is a mess, 
both in visual design (anchor editor) and in code (see anchor docking). 
IMO they are nothing but a misfeature, violating the rule "keep it 
simple" :-(

> Even with the English language I often see captions 
> or groupboxes or labels being clipped, because those dialogs might have 
> been designed under Windows, but because GTK2 components are normally 
> larger, things don't fit.

For international development it were desireable to change the language 
in the GUI at design time, in order to verify a constructed.

We should consider a major update of the layout handling in one of the 
next versions, taking into account docking managers. As already 
mentioned, a docking manager is more a layout manager, the issues with 
dragging and docking are almost handled in the drag manager. The only 
difference between an dock tree and other tree-style layout managers is 
the distribution of the available or required space to the layout zones 
or containers.

DoDi





More information about the Lazarus mailing list