Donald R. Ziesig schrieb:
procedure TForm1.Button1Click(Sender: TObject);
begin
Inc(N);
TabControl1.Tabs.AddObject(IntToStr(N),TObject(N));
end;
procedure TForm1.TabControl1Change(Sender: TObject);
var
I : Integer;
begin
I := TabControl1.TabIndex;
Label1.Caption := IntToStr(Integer(TabControl1.Tabs.Objects[I]));
end;
AFAIR the Tabs.Objects property is implemented differently from Delphi,
i.e. the LCL doesn't support it at all :-(
Chances for an fix are low, because the LCL TabControl is based on the
gtk implementation, that differs widely from the Win32 ComCtrls
implementation.
P.S. I have tried to find the LCL code and debug the library myself but
I must be missing something in my searches. Some pointers in that area
would also be appreciated.
Controls have their high-level interface in the LCLBase package, e.g.
"class TTabControl" in lcl\ComCtrls.pp, and their associated widget in
e.g. lcl\interfaces\win32\win32wscomctrls.pp.
DoDi
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus