RxFPC:RxPopupNotifier - new style for close button and timer label

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6411 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2018-05-14 13:30:07 +00:00
parent eaf489ce44
commit 60128ccaed
9 changed files with 322 additions and 54 deletions

View File

@@ -123,13 +123,72 @@ object Form1: TForm1
OnClick = Button1Click
TabOrder = 5
end
object TrackBar1: TTrackBar
Left = 35
Height = 52
Top = 265
Width = 485
Max = 250
Position = 250
TabOrder = 6
end
object CheckBox1: TCheckBox
Left = 415
Height = 24
Top = 53
Width = 137
Caption = 'Show close timer'
Checked = True
State = cbChecked
TabOrder = 7
end
object SpeedButton1: TSpeedButton
Left = 422
Height = 26
Top = 7
Width = 26
Glyph.Data = {
1A020000424D1A0200000000000036000000280000000B0000000B0000000100
200000000000E401000064000000640000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000FF0000
00FF00000000000000000000000000000000000000FF000000FF000000000000
00000000000000000000000000FF000000FF0000000000000000000000FF0000
00FF000000000000000000000000000000000000000000000000000000FF0000
00FF000000FF000000FF00000000000000000000000000000000000000000000
00000000000000000000000000FF000000FF0000000000000000000000000000
000000000000000000000000000000000000000000FF000000FF000000FF0000
00FF000000000000000000000000000000000000000000000000000000FF0000
00FF0000000000000000000000FF000000FF0000000000000000000000000000
0000000000FF000000FF00000000000000000000000000000000000000FF0000
00FF000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
}
end
object BitBtn1: TBitBtn
Left = 150
Height = 36
Top = 325
Width = 60
AutoSize = True
Default = True
DefaultCaption = True
Kind = bkOK
ModalResult = 1
TabOrder = 8
end
object RxPopupNotifier1: TRxPopupNotifier
Items = <
item
Active = False
Color = clAqua
AutoClose = False
Caption = 'Design message'
Message = 'Design time message'
CloseButton.Hint = 'Close message'
CloseButton.Flat = True
end>
OnNotifiClick = RxPopupNotifier1NotifiClick
Left = 176

View File

@@ -6,21 +6,25 @@ interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls,
PopupNotifier, ExtCtrls, ColorBox, MRUList, rxPopupNotifier, rxtooledit, DB;
ExtCtrls, ColorBox, ComCtrls, Buttons, rxPopupNotifier;
type
{ TForm1 }
TForm1 = class(TForm)
BitBtn1: TBitBtn;
Button1: TButton;
Button4: TButton;
Button5: TButton;
Button6: TButton;
CheckBox1: TCheckBox;
ColorBox1: TColorBox;
Label1: TLabel;
RadioGroup1: TRadioGroup;
RxPopupNotifier1: TRxPopupNotifier;
SpeedButton1: TSpeedButton;
TrackBar1: TTrackBar;
procedure Button1Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
@@ -71,7 +75,14 @@ var
begin
Inc(FCurID);
R1:=RxPopupNotifier1.AddNotifyItem('Warning', 'Error message № ' + IntToStr(FCurID));
R1.ShowCloseTimer:=true;
if TrackBar1.Position < 255 then
begin
R1.AlphaBlend:=true;
R1.AlphaBlendValue:=TrackBar1.Position;
end;
R1.ShowCloseTimer:=CheckBox1.Checked;
R1.Color:=ColorBox1.Selected;
end;
@@ -89,6 +100,7 @@ end;
procedure TForm1.RadioGroup1Click(Sender: TObject);
begin
RxPopupNotifier1.MessageCorner:=TRxPopupNotifierCorner(RadioGroup1.ItemIndex);
// Hint:=;
end;
procedure TForm1.RxPopupNotifier1NotifiClick(Sender: TRxPopupNotifier;