Hi, Am Montag, den 22.08.2005, 20:16 +0200 schrieb Mattias Gaertner: > On Mon, 22 Aug 2005 19:17:13 +0200 > Danny Milosavljevic <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > Am Montag, den 22.08.2005, 16:19 +0200 schrieb A.J. Venter: > [...] > > gtk uses so-called containers. If you dont specify coordinates and sizes > > but relationships, you'll never run into those problems. > > > > Now I was a delphi user too and I know that there you dont have another > > choice than using pixel coordinates all over the place. However, I do > > think that lazarus added better anchors with relationships. Use them. > > > > In gtk, "placing" a edit box and, to the right a button is > > (pseudo-code): > > > > container := THorizontalBox.Create; > > container.BorderWidth := 7; > > In LCL: > container := TPanel.Create(Self); > container.BevelSize:=0; > container.ChildSizing.LeftRightSpacing := 7; > container.ChildSizing.TopBottomSpacing := 7; > > > > e := TEdit.Create(); > > e.Text := 'edit'; > > e.Align:=alLeft; > > > > b := TButton.Create(); > > b.Caption := 'Boo'; > > b.Align:=alLeft; > > > > container.Add(e); > > container.Add(b); > > e.Parent:=container; > b.Parent:=container; > > > > window.Add(container); > > container.Parent:=Self; > > > Mattias
Nice! Thanks for pointing out how it works in lazarus :) cheers, Danny > [...] -- www.keyserver.net key id A334AEA6
signature.asc
Description: This is a digitally signed message part
