[Lazarus] Carbon and TMemo/TEdit
Damien Gerard
milipili at shikami.org
Fri May 30 16:23:59 CEST 2008
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 controls
> DG> 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 TMemo
> don't
> DG> have a border and they are not properly drawn when scrolling 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.
--
Damien Gerard
milipili at shikami.org
"Intelligence is 10 million rules."
-- Douglas Lenat
More information about the Lazarus
mailing list