mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 12:09:21 +02:00
LCL-CustomDrawn: Advances the support for TPageControl, not yet fully working
git-svn-id: trunk@38251 -
This commit is contained in:
parent
b44a2ec7f3
commit
fcbbb972cb
@ -42,9 +42,9 @@ type
|
||||
|
||||
TCDWSCustomPage = class(TWSCustomPage)
|
||||
published
|
||||
{ class function CreateHandle(const AWinControl: TWinControl;
|
||||
class function CreateHandle(const AWinControl: TWinControl;
|
||||
const AParams: TCreateParams): TLCLIntfHandle; override;
|
||||
class procedure UpdateProperties(const ACustomPage: TCustomPage); override;}
|
||||
// class procedure UpdateProperties(const ACustomPage: TCustomPage); override;}
|
||||
end;
|
||||
|
||||
{ TCDWSCustomTabControl }
|
||||
@ -259,6 +259,28 @@ type
|
||||
|
||||
implementation
|
||||
|
||||
{ TCDWSCustomPage }
|
||||
|
||||
// Return the handle of the page installed in the TCDPageControl instead of creating a new one
|
||||
class function TCDWSCustomPage.CreateHandle(const AWinControl: TWinControl;
|
||||
const AParams: TCreateParams): TLCLIntfHandle;
|
||||
var
|
||||
lPageControlHandle: TCDWinControl;
|
||||
begin
|
||||
if AWinControl is TTabSheet then
|
||||
begin
|
||||
lPageControlHandle := TCDWinControl(TTabSheet(AWinControl).PageControl.Handle);
|
||||
if not lPageControlHandle.CDControlInjected then
|
||||
begin
|
||||
TCDWSCustomTabControl.InjectCDControl(AWinControl, lPageControlHandle.CDControl);
|
||||
lPageControlHandle.CDControlInjected := True;
|
||||
end;
|
||||
Result := lPageControlHandle.CDControl.Handle;
|
||||
end
|
||||
else
|
||||
Result := TCDWSWinControl.CreateHandle(AWinControl, AParams);
|
||||
end;
|
||||
|
||||
{ TCDWSCustomTabControl }
|
||||
|
||||
class procedure TCDWSCustomTabControl.InjectCDControl(
|
||||
|
@ -168,7 +168,8 @@ end;
|
||||
|
||||
function RegisterTabSheet: Boolean; alias : 'WSRegisterTabSheet';
|
||||
begin
|
||||
Result := False;
|
||||
RegisterWSComponent(TCustomPage, TCDWSCustomPage);
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
function RegisterPageControl: Boolean; alias : 'WSRegisterPageControl';
|
||||
@ -342,12 +343,14 @@ begin
|
||||
end;
|
||||
|
||||
// extctrls
|
||||
// Already registered in function RegisterTabSheet: Boolean;
|
||||
function RegisterCustomPage: Boolean; alias : 'WSRegisterCustomPage';
|
||||
begin
|
||||
// RegisterWSComponent(TCustomPage, TWinCEWSCustomPage);
|
||||
//RegisterWSComponent(TCustomPage, TCDWSCustomPage);
|
||||
Result := False;
|
||||
end;
|
||||
|
||||
// Already registered in function RegisterPageControl: Boolean;
|
||||
function RegisterCustomNotebook: Boolean; alias : 'WSRegisterCustomNotebook';
|
||||
begin
|
||||
// RegisterWSComponent(TCustomTabControl, TWinCEWSCustomNotebook);
|
||||
|
Loading…
Reference in New Issue
Block a user