On Fri, 30 May 2008 16:23:59 +0200 Damien Gerard <[EMAIL PROTECTED]> wrote:
> > Le May 30, 2008 à 4:05 PM, JoshyFun a écrit : > > > Hello Damien, > > > > Friday, May 30, 2008, 10:47:57 AM, you wrote: > > > > DG> I have in my app a TScrollBox (AutoScroll=True) with some > > DG> controls created by hand as follow : > > DG> E := TEdit.Create(nil); > > DG> E.Parent := MyScrollBox; > > DG> [...] > > DG> Works fine under GTK2/Win32. However with Carbon TEdit and > > DG> TMemo > > don't > > DG> have a border and they are not properly drawn when scrolling > > DG> in > > the > > DG> TScrollBox. > > > > I do not have any kind of experience with Carbon, but controls to be > > used inside another objects should be added using InsertControl, do > > not ? Maybe I'm completly wrong... as usual :) > > It seems it is useless. > From procedure TControl.SetParent(NewParent: TWinControl); > you can find this : > if NewParent <> nil then NewParent.InsertControl(Self); > > Consequently E.Parent := <Something> should be enough. > I don't think actually InsertControl should be used. Assigning 'Parent' is the normal way. Mattias _______________________________________________ Lazarus mailing list [email protected] http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
