You've already forked lazarus-ccr
RxFPC: restore close button in TRxPopupNotifier window
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6351 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -36,7 +36,7 @@ unit RxPopupNotifier;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, ExtCtrls, Forms, Graphics, Controls, StdCtrls;
|
Classes, SysUtils, ExtCtrls, Forms, Graphics, Controls, StdCtrls, Buttons;
|
||||||
|
|
||||||
type
|
type
|
||||||
TRxPopupNotifierItem = class;
|
TRxPopupNotifierItem = class;
|
||||||
@ -48,8 +48,9 @@ type
|
|||||||
|
|
||||||
{ TRxNotifierForm }
|
{ TRxNotifierForm }
|
||||||
|
|
||||||
TRxNotifierForm = class(THintWindow)
|
TRxNotifierForm = class(TCustomForm)
|
||||||
private
|
private
|
||||||
|
//FCloseButton:TSpeedButton;
|
||||||
FCloseButton:TButton;
|
FCloseButton:TButton;
|
||||||
FCaptionLabel:TLabel;
|
FCaptionLabel:TLabel;
|
||||||
FMessageLabel:TLabel;
|
FMessageLabel:TLabel;
|
||||||
@ -61,7 +62,7 @@ type
|
|||||||
procedure CreateTimerLabel;
|
procedure CreateTimerLabel;
|
||||||
procedure ButtonCloseClick(Sender: TObject);
|
procedure ButtonCloseClick(Sender: TObject);
|
||||||
protected
|
protected
|
||||||
procedure DoShowWindow; override;
|
//procedure DoShowWindow; override;
|
||||||
public
|
public
|
||||||
constructor CreateNotifierForm(AOwnerItem:TRxPopupNotifierItem);
|
constructor CreateNotifierForm(AOwnerItem:TRxPopupNotifierItem);
|
||||||
end;
|
end;
|
||||||
@ -161,18 +162,23 @@ uses rxconst, LCLType;
|
|||||||
procedure TRxNotifierForm.CreateCloseButton;
|
procedure TRxNotifierForm.CreateCloseButton;
|
||||||
begin
|
begin
|
||||||
begin
|
begin
|
||||||
{ FCloseButton:=TButton.Create(Self);
|
//FCloseButton:=TSpeedButton.Create(Self);
|
||||||
|
FCloseButton:=TButton.Create(Self);
|
||||||
FCloseButton.Parent:=Self;
|
FCloseButton.Parent:=Self;
|
||||||
FCloseButton.Caption:=sClose;
|
|
||||||
FCloseButton.AutoSize:=true;
|
FCloseButton.AutoSize:=true;
|
||||||
|
FCloseButton.Caption:=' X '; //sClose;
|
||||||
|
FCloseButton.Top:=6;
|
||||||
|
//FCloseButton.Flat:=true;
|
||||||
|
//FCloseButton.Left:=Width - Canvas.TextWidth(FCloseButton.Caption) - 6;
|
||||||
|
FCloseButton.Left:=Width - FCloseButton.Width - 6;
|
||||||
|
{
|
||||||
FCloseButton.BorderSpacing.Around:=6;
|
FCloseButton.BorderSpacing.Around:=6;
|
||||||
FCloseButton.Left:=Width - FCloseButton.Width;
|
|
||||||
FCloseButton.AnchorSideLeft.Control:=nil;
|
FCloseButton.AnchorSideLeft.Control:=nil;
|
||||||
FCloseButton.AnchorSideRight.Control:=Self;
|
FCloseButton.AnchorSideRight.Control:=Self;
|
||||||
FCloseButton.AnchorSideRight.Side:=asrRight;
|
FCloseButton.AnchorSideRight.Side:=asrRight;
|
||||||
FCloseButton.AnchorSideTop.Control:=Self;
|
FCloseButton.AnchorSideTop.Control:=Self;}
|
||||||
|
|
||||||
FCloseButton.OnClick:=@ButtonCloseClick; }
|
FCloseButton.OnClick:=@ButtonCloseClick;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -214,7 +220,7 @@ procedure TRxNotifierForm.ButtonCloseClick(Sender: TObject);
|
|||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
end;
|
end;
|
||||||
|
(*
|
||||||
procedure TRxNotifierForm.DoShowWindow;
|
procedure TRxNotifierForm.DoShowWindow;
|
||||||
begin
|
begin
|
||||||
if (ActiveControl = nil) and (not (csDesigning in ComponentState)) and (Parent=nil) then
|
if (ActiveControl = nil) and (not (csDesigning in ComponentState)) and (Parent=nil) then
|
||||||
@ -226,13 +232,13 @@ begin
|
|||||||
ActiveControl := FindNextControl(nil, True, True, False); //FindDefaultForActiveControl;
|
ActiveControl := FindNextControl(nil, True, True, False); //FindDefaultForActiveControl;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
*)
|
||||||
constructor TRxNotifierForm.CreateNotifierForm(AOwnerItem: TRxPopupNotifierItem
|
constructor TRxNotifierForm.CreateNotifierForm(AOwnerItem: TRxPopupNotifierItem
|
||||||
);
|
);
|
||||||
begin
|
begin
|
||||||
inherited CreateNew(Application);
|
inherited CreateNew(Application);
|
||||||
FOwnerItem:=AOwnerItem;
|
FOwnerItem:=AOwnerItem;
|
||||||
fCompStyle := csHintWindow;
|
//fCompStyle := csHintWindow;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TNotifierCollection }
|
{ TNotifierCollection }
|
||||||
|
Reference in New Issue
Block a user