* Implement add TSpkCheckbox and TSpkRadiobutton plus misc fixes. patch by Werner Pamler with some changes

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2447 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
blikblum
2012-06-04 00:49:51 +00:00
parent a8f297b927
commit e8feb4830b
11 changed files with 1005 additions and 67 deletions

View File

@ -48,6 +48,9 @@ type TSpkTab = class;
FMouseHoverElement : TSpkMouseTabElement;
FMouseActiveElement : TSpkMouseTabElement;
FOnClick: TNotifyEvent;
protected
FToolbarDispatch : TSpkBaseToolbarDispatch;
FCaption : string;
@ -109,6 +112,8 @@ type TSpkTab = class;
// *** Obs³uga elementów ***
procedure FreeingPane(APane : TSpkPane);
procedure ExecOnClick;
property ToolbarDispatch : TSpkBaseToolbarDispatch read FToolbarDispatch write SetToolbarDispatch;
property Appearance : TSpkToolbarAppearance read FAppearance write SetAppearance;
@ -123,6 +128,7 @@ type TSpkTab = class;
property Caption : string read FCaption write SetCaption;
property OverrideAppearance : boolean read FOverrideAppearance write SetOverrideAppearance;
property Visible : boolean read FVisible write SetVisible;
property OnClick: TNotifyEvent read FOnClick write FOnClick;
end;
type TSpkTabs = class(TSpkCollection)
@ -301,6 +307,12 @@ if AtLeastOnePaneVisible then
end;
end;
procedure TSpkTab.ExecOnClick;
begin
if Assigned(FOnClick) then
FOnClick(self);
end;
function TSpkTab.FindPaneAt(x, y: integer): integer;
var i : integer;
@ -625,7 +637,7 @@ result.Parent:=Parent;
if FRootComponent<>nil then
begin
i:=1;
i:=0;
while FRootComponent.Owner.FindComponent('SpkTab'+inttostr(i))<>nil do
inc(i);
@ -681,7 +693,7 @@ result.Parent:=Parent;
if FRootComponent<>nil then
begin
i:=1;
i:=0;
while FRootComponent.Owner.FindComponent('SpkTab'+inttostr(i))<>nil do
inc(i);