RxFPC:new options for RxMDI. See demo. thx user rtn from freepascal.ru

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6128 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2018-01-12 10:28:22 +00:00
parent 210853a090
commit a906dbdc1d
12 changed files with 407 additions and 57 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
<Version Value="11"/>
<General>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
@ -23,9 +23,10 @@
<ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
</local>
<FormatVersion Value="2"/>
<Modes Count="1">
<Mode0 Name="default"/>
</Modes>
</RunParams>
<RequiredPackages Count="2">
<Item1>

View File

@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectSession>
<Version Value="9"/>
<Version Value="11"/>
<BuildModes Active="Default"/>
<Units Count="6">
<Units Count="13">
<Unit0>
<Filename Value="project1.lpr"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="-1"/>
<CursorPos X="43" Y="10"/>
<UsageCount Value="22"/>
<UsageCount Value="25"/>
</Unit0>
<Unit1>
<Filename Value="unit1.pas"/>
@ -19,9 +19,9 @@
<ResourceBaseClass Value="Form"/>
<UnitName Value="Unit1"/>
<IsVisibleTab Value="True"/>
<TopLine Value="41"/>
<CursorPos X="34" Y="67"/>
<UsageCount Value="22"/>
<TopLine Value="72"/>
<CursorPos X="70" Y="89"/>
<UsageCount Value="25"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
</Unit1>
@ -35,7 +35,7 @@
<EditorIndex Value="-1"/>
<TopLine Value="3"/>
<CursorPos X="6" Y="11"/>
<UsageCount Value="22"/>
<UsageCount Value="25"/>
</Unit2>
<Unit3>
<Filename Value="unit3.pas"/>
@ -46,7 +46,7 @@
<UnitName Value="Unit3"/>
<EditorIndex Value="-1"/>
<CursorPos Y="19"/>
<UsageCount Value="22"/>
<UsageCount Value="25"/>
</Unit3>
<Unit4>
<Filename Value="unit4.pas"/>
@ -57,7 +57,7 @@
<UnitName Value="Unit4"/>
<EditorIndex Value="-1"/>
<CursorPos X="32" Y="8"/>
<UsageCount Value="22"/>
<UsageCount Value="25"/>
</Unit4>
<Unit5>
<Filename Value="../../rxmdi.pas"/>
@ -67,24 +67,183 @@
<CursorPos Y="711"/>
<UsageCount Value="11"/>
</Unit5>
<Unit6>
<Filename Value="../../rxcontrols/rxmdi.pas"/>
<UnitName Value="RxMDI"/>
<EditorIndex Value="1"/>
<TopLine Value="262"/>
<CursorPos X="24" Y="281"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit6>
<Unit7>
<Filename Value="../../../../lcl/buttons.pp"/>
<UnitName Value="Buttons"/>
<EditorIndex Value="-1"/>
<TopLine Value="219"/>
<CursorPos Y="304"/>
<UsageCount Value="10"/>
</Unit7>
<Unit8>
<Filename Value="/home/install/source/fpcsrc/rtl/objpas/classes/classesh.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="1854"/>
<CursorPos X="14" Y="1905"/>
<UsageCount Value="10"/>
</Unit8>
<Unit9>
<Filename Value="../../../../lcl/controls.pp"/>
<UnitName Value="Controls"/>
<EditorIndex Value="-1"/>
<TopLine Value="176"/>
<CursorPos X="44" Y="195"/>
<UsageCount Value="10"/>
</Unit9>
<Unit10>
<Filename Value="../../rxcontrols/RxMDICloseIcon.lrs"/>
<EditorIndex Value="-1"/>
<UsageCount Value="10"/>
</Unit10>
<Unit11>
<Filename Value="../../rxtools/rxconst.pas"/>
<EditorIndex Value="2"/>
<TopLine Value="96"/>
<CursorPos X="3" Y="112"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit11>
<Unit12>
<Filename Value="/home/install/source/fpcsrc/rtl/objpas/classes/reader.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="771"/>
<CursorPos X="53" Y="789"/>
<UsageCount Value="10"/>
</Unit12>
</Units>
<JumpHistory Count="4" HistoryIndex="3">
<JumpHistory Count="30" HistoryIndex="29">
<Position1>
<Filename Value="unit1.pas"/>
<Caret Line="74" Column="26" TopLine="44"/>
<Caret Line="117" Column="44" TopLine="80"/>
</Position1>
<Position2>
<Filename Value="unit1.pas"/>
<Caret Line="75" Column="26" TopLine="45"/>
<Filename Value="../../rxcontrols/rxmdi.pas"/>
<Caret Line="161" Column="15" TopLine="143"/>
</Position2>
<Position3>
<Filename Value="unit1.pas"/>
<Caret Line="82" Column="26" TopLine="47"/>
<Filename Value="../../rxcontrols/rxmdi.pas"/>
<Caret Line="432" Column="3" TopLine="427"/>
</Position3>
<Position4>
<Filename Value="unit1.pas"/>
<Caret Line="67" Column="34" TopLine="56"/>
<Filename Value="../../rxcontrols/rxmdi.pas"/>
<Caret Line="160" Column="15" TopLine="142"/>
</Position4>
<Position5>
<Filename Value="unit1.pas"/>
<Caret Line="117" Column="44" TopLine="80"/>
</Position5>
<Position6>
<Filename Value="../../rxcontrols/rxmdi.pas"/>
<Caret Line="161" Column="15" TopLine="143"/>
</Position6>
<Position7>
<Filename Value="../../rxcontrols/rxmdi.pas"/>
<Caret Line="439" Column="31" TopLine="408"/>
</Position7>
<Position8>
<Filename Value="unit1.pas"/>
<Caret Line="117" Column="44" TopLine="89"/>
</Position8>
<Position9>
<Filename Value="unit1.pas"/>
<Caret Line="103" Column="3" TopLine="89"/>
</Position9>
<Position10>
<Filename Value="../../rxcontrols/rxmdi.pas"/>
<Caret Line="160" Column="15" TopLine="142"/>
</Position10>
<Position11>
<Filename Value="../../rxcontrols/rxmdi.pas"/>
<Caret Line="415" Column="31" TopLine="410"/>
</Position11>
<Position12>
<Filename Value="../../rxcontrols/rxmdi.pas"/>
<Caret Line="877" TopLine="851"/>
</Position12>
<Position13>
<Filename Value="../../rxcontrols/rxmdi.pas"/>
</Position13>
<Position14>
<Filename Value="../../rxcontrols/rxmdi.pas"/>
<Caret Line="283" Column="56" TopLine="252"/>
</Position14>
<Position15>
<Filename Value="../../rxcontrols/rxmdi.pas"/>
<Caret Line="177" Column="85" TopLine="141"/>
</Position15>
<Position16>
<Filename Value="../../rxcontrols/rxmdi.pas"/>
<Caret Line="302" Column="3" TopLine="299"/>
</Position16>
<Position17>
<Filename Value="../../rxcontrols/rxmdi.pas"/>
<Caret Line="145" Column="15" TopLine="128"/>
</Position17>
<Position18>
<Filename Value="unit1.pas"/>
<Caret Line="108" Column="55" TopLine="89"/>
</Position18>
<Position19>
<Filename Value="unit1.pas"/>
<Caret Line="110" Column="55" TopLine="91"/>
</Position19>
<Position20>
<Filename Value="unit1.pas"/>
<Caret Line="118" TopLine="91"/>
</Position20>
<Position21>
<Filename Value="unit1.pas"/>
<Caret Line="119" Column="12" TopLine="92"/>
</Position21>
<Position22>
<Filename Value="unit1.pas"/>
<Caret Line="53" Column="15" TopLine="35"/>
</Position22>
<Position23>
<Filename Value="../../rxcontrols/rxmdi.pas"/>
<Caret Line="283" Column="5" TopLine="275"/>
</Position23>
<Position24>
<Filename Value="../../rxcontrols/rxmdi.pas"/>
<Caret Line="146" Column="17" TopLine="137"/>
</Position24>
<Position25>
<Filename Value="../../rxcontrols/rxmdi.pas"/>
<Caret Line="142" Column="8" TopLine="133"/>
</Position25>
<Position26>
<Filename Value="../../rxcontrols/rxmdi.pas"/>
<Caret Line="147" Column="20" TopLine="141"/>
</Position26>
<Position27>
<Filename Value="../../rxcontrols/rxmdi.pas"/>
<Caret Line="312" Column="33" TopLine="301"/>
</Position27>
<Position28>
<Filename Value="../../rxcontrols/rxmdi.pas"/>
<Caret Line="281" Column="24" TopLine="262"/>
</Position28>
<Position29>
<Filename Value="unit1.pas"/>
<Caret Line="91" Column="58" TopLine="72"/>
</Position29>
<Position30>
<Filename Value="unit1.pas"/>
<Caret Line="89" Column="70" TopLine="72"/>
</Position30>
</JumpHistory>
<RunParams>
<FormatVersion Value="2"/>
<Modes Count="0" ActiveMode="default"/>
</RunParams>
</ProjectSession>
</CONFIG>

View File

@ -1,33 +1,35 @@
object Form1: TForm1
Left = 527
Height = 423
Height = 435
Top = 222
Width = 581
Width = 613
Caption = 'MainForm'
ClientHeight = 400
ClientWidth = 581
ClientHeight = 407
ClientWidth = 613
Menu = MainMenu1
OnCreate = FormCreate
Position = poScreenCenter
LCLVersion = '1.1'
LCLVersion = '1.9.0.0'
WindowState = wsMaximized
object ToolPanel1: TToolPanel
Left = 0
Height = 31
Top = 0
Width = 581
Width = 613
Items = <>
Options = []
CustomizeShortCut = False
Align = alTop
BorderWidth = 4
ClientHeight = 31
ClientWidth = 581
ClientWidth = 613
TabOrder = 0
object RxMDICloseButton1: TRxMDICloseButton
AnchorSideTop.Control = ToolPanel1
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = ToolPanel1
AnchorSideRight.Side = asrBottom
Left = 553
Left = 585
Height = 22
Top = 4
Width = 23
@ -56,30 +58,41 @@ object Form1: TForm1
object RxMDITasks1: TRxMDITasks
Left = 0
Height = 25
Top = 356
Width = 581
Top = 360
Width = 613
Align = alBottom
FlatButton = True
Options = [rxtoMidleClickClose]
end
object StatusBar1: TStatusBar
Left = 0
Height = 19
Top = 381
Width = 581
Panels = <>
Height = 22
Top = 385
Width = 613
Panels = <
item
Width = 100
end
item
Width = 150
end>
SimplePanel = False
end
object RxMDIPanel1: TRxMDIPanel
Left = 0
Height = 325
Height = 329
Top = 31
Width = 581
Width = 613
CloseButton = RxMDICloseButton1
TaskPanel = RxMDITasks1
Align = alClient
BevelOuter = bvLowered
HideCloseButton = False
OnChangeCurrentChild = RxMDIPanel1ChangeCurrentChild
end
object ActionList1: TActionList
left = 440
top = 72
Left = 440
Top = 72
object sysClose: TAction
Category = 'System'
Caption = 'Close'
@ -100,16 +113,46 @@ object Form1: TForm1
Caption = 'New single MDI form'
OnExecute = Action3Execute
end
object optShowInfoLabel: TAction
Category = 'Options'
Caption = 'Show info label'
Checked = True
OnExecute = optShowInfoLabelExecute
end
object optMidleMouseClickClose: TAction
Category = 'Options'
Caption = 'Midle mouse button close form'
Checked = True
OnExecute = optMidleMouseClickCloseExecute
end
object optHideCloseButton: TAction
Category = 'Options'
Caption = 'Hide close button'
Checked = True
OnExecute = optHideCloseButtonExecute
end
end
object MainMenu1: TMainMenu
left = 408
top = 72
Left = 408
Top = 72
object MenuItem1: TMenuItem
Caption = 'System'
object MenuItem2: TMenuItem
Action = sysClose
end
end
object MenuItem8: TMenuItem
Caption = 'Options'
object MenuItem9: TMenuItem
Action = optShowInfoLabel
end
object MenuItem10: TMenuItem
Action = optMidleMouseClickClose
end
object MenuItem11: TMenuItem
Action = optHideCloseButton
end
end
object MenuItem3: TMenuItem
Caption = 'MDI forms'
object MenuItem4: TMenuItem
@ -129,7 +172,7 @@ object Form1: TForm1
object Timer1: TTimer
Interval = 500
OnTimer = Timer1Timer
left = 451
top = 117
Left = 451
Top = 117
end
end

View File

@ -16,6 +16,12 @@ type
Action1: TAction;
Action2: TAction;
Action3: TAction;
MenuItem11: TMenuItem;
optHideCloseButton: TAction;
MenuItem10: TMenuItem;
optMidleMouseClickClose: TAction;
MenuItem9: TMenuItem;
optShowInfoLabel: TAction;
MenuItem1: TMenuItem;
MenuItem2: TMenuItem;
MenuItem3: TMenuItem;
@ -23,6 +29,7 @@ type
MenuItem5: TMenuItem;
MenuItem6: TMenuItem;
MenuItem7: TMenuItem;
MenuItem8: TMenuItem;
sysClose: TAction;
ActionList1: TActionList;
MainMenu1: TMainMenu;
@ -35,10 +42,15 @@ type
procedure Action1Execute(Sender: TObject);
procedure Action2Execute(Sender: TObject);
procedure Action3Execute(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure optHideCloseButtonExecute(Sender: TObject);
procedure optMidleMouseClickCloseExecute(Sender: TObject);
procedure optShowInfoLabelExecute(Sender: TObject);
procedure RxMDIPanel1ChangeCurrentChild(Sender: TRxMDIPanel; AForm: TForm);
procedure sysCloseExecute(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
private
{ private declarations }
procedure UpdateOptions;
public
{ public declarations }
end;
@ -62,12 +74,23 @@ end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
if Assigned(ActiveControl) then
StatusBar1.SimpleText:=ActiveControl.Caption
StatusBar1.Panels[0].Text:=ActiveControl.Caption
else
StatusBar1.SimpleText:='<NONE>'
StatusBar1.Panels[0].Text:='<NONE>'
;
end;
procedure TForm1.UpdateOptions;
begin
RxMDICloseButton1.ShowInfoLabel:=optShowInfoLabel.Checked;
if optMidleMouseClickClose.Checked then
RxMDITasks1.Options:=RxMDITasks1.Options + [rxtoMidleClickClose]
else
RxMDITasks1.Options:=RxMDITasks1.Options - [rxtoMidleClickClose];
RxMDIPanel1.HideCloseButton:=optHideCloseButton.Checked;
end;
procedure TForm1.Action1Execute(Sender: TObject);
begin
RxMDIPanel1.ChildWindowsCreate(Form2, TForm2);
@ -86,5 +109,38 @@ begin
RxMDIPanel1.ChildWindowsAdd(Form4);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
UpdateOptions;
end;
procedure TForm1.optHideCloseButtonExecute(Sender: TObject);
begin
optHideCloseButton.Checked:=not optHideCloseButton.Checked;
UpdateOptions;
end;
procedure TForm1.optMidleMouseClickCloseExecute(Sender: TObject);
begin
optMidleMouseClickClose.Checked:=not optMidleMouseClickClose.Checked;
UpdateOptions;
end;
procedure TForm1.optShowInfoLabelExecute(Sender: TObject);
begin
optShowInfoLabel.Checked:=not optShowInfoLabel.Checked;
UpdateOptions;
end;
procedure TForm1.RxMDIPanel1ChangeCurrentChild(Sender: TRxMDIPanel; AForm: TForm
);
begin
if Assigned(AForm) then
StatusBar1.Panels[1].Text:=AForm.Caption
else
StatusBar1.Panels[1].Text:='<NONE>'
;
end;
end.

View File

@ -79,6 +79,10 @@ msgstr "Destino"
msgid "Source"
msgstr "Fuente"
#: rxconst.serrorlinkedtaskpanel
msgid "Not assigned task panel"
msgstr ""
#: rxconst.sexptcontrolnotfound
msgid "Control not found in validate %s."
msgstr ""

View File

@ -77,6 +77,10 @@ msgstr ""
msgid "Source"
msgstr ""
#: rxconst.serrorlinkedtaskpanel
msgid "Not assigned task panel"
msgstr ""
#: rxconst.sexptcontrolnotfound
msgid "Control not found in validate %s."
msgstr ""

View File

@ -77,6 +77,10 @@ msgstr "Выбор"
msgid "Source"
msgstr "Источник"
#: rxconst.serrorlinkedtaskpanel
msgid "Not assigned task panel"
msgstr ""
#: rxconst.sexptcontrolnotfound
msgid "Control not found in validate %s."
msgstr "Элемент управления не найден в валидаторе %s"

View File

@ -90,6 +90,10 @@ msgstr "Призначення"
msgid "Source"
msgstr "Джерело"
#: rxconst.serrorlinkedtaskpanel
msgid "Not assigned task panel"
msgstr ""
#: rxconst.sexptcontrolnotfound
msgid "Control not found in validate %s."
msgstr "Елемент управління не знайдений в валідаторі %s"

View File

@ -38,9 +38,14 @@ uses
Classes, SysUtils, Forms, Buttons, Menus, ExtCtrls, Graphics, Controls;
type
TRxMDITaskOption = (rxtoMidleClickClose);
TRxMDITaskOptions = set of TRxMDITaskOption;
TRxMDIPanel = class;
TRxMDITasks = class;
TRxMDIPanelChangeCurrentChild = procedure (Sender:TRxMDIPanel; AForm:TForm) of object;
{ TRxMDIButton }
TRxMDIButton = class(TSpeedButton)
@ -60,6 +65,7 @@ type
FMenu:TPopupMenu;
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
protected
procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
public
constructor CreateButton(AOwner:TRxMDITasks; AForm:TForm);
@ -75,6 +81,7 @@ type
FBtnScrollLeft:TSpeedButton;
FBtnScrollRigth:TSpeedButton;
FMainPanel: TRxMDIPanel;
FOptions: TRxMDITaskOptions;
function GetFlatButton: boolean;
procedure SetFlatButton(AValue: boolean);
procedure UpdateScrollBtnStatus;
@ -98,6 +105,7 @@ type
property ShowHint;
property ParentShowHint;
property FlatButton:boolean read GetFlatButton write SetFlatButton;
property Options:TRxMDITaskOptions read FOptions write FOptions;
end;
{ TRxMDICloseButton }
@ -107,6 +115,8 @@ type
FInfoLabel:TBoundLabel;
FLabelSpacing:integer;
FMDIPanel:TRxMDIPanel;
FShowInfoLabel: boolean;
procedure SetShowInfoLabel(AValue: boolean);
protected
procedure SetParent(AParent: TWinControl); override;
procedure Loaded; override;
@ -120,6 +130,7 @@ type
property Anchors;
property Glyph;
property Flat;
property ShowInfoLabel:boolean read FShowInfoLabel write SetShowInfoLabel default true;
end;
{ TRxMDIPanel }
@ -128,14 +139,18 @@ type
private
FCurrentChildWindow: TForm;
FCloseButton: TRxMDICloseButton;
FHideCloseButton: boolean;
FOnChangeCurrentChild: TRxMDIPanelChangeCurrentChild;
FTaskPanel: TRxMDITasks;
procedure SetCurrentChildWindow(AValue: TForm);
procedure navCloseButtonClick(Sender: TObject);
procedure SetHideCloseButton(AValue: boolean);
procedure SetRxMDICloseButton(AValue: TRxMDICloseButton);
procedure SetTaskPanel(AValue: TRxMDITasks);
function MDIButtonByForm(AForm:TForm):TRxMDIButton;
procedure HideCurrentWindow;
procedure ScreenEventRemoveForm(Sender: TObject; Form: TCustomForm);
procedure DoOnChangeCurrentChild(AForm:TForm);
protected
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
procedure Loaded; override;
@ -159,6 +174,8 @@ type
property BevelOuter;
property ShowHint;
property ParentShowHint;
property HideCloseButton:boolean read FHideCloseButton write SetHideCloseButton;
property OnChangeCurrentChild:TRxMDIPanelChangeCurrentChild read FOnChangeCurrentChild write FOnChangeCurrentChild;
end;
implementation
@ -167,6 +184,14 @@ uses LResources, rxlclutils, rxconst;
{ TRxMDICloseButton }
procedure TRxMDICloseButton.SetShowInfoLabel(AValue: boolean);
begin
if FShowInfoLabel=AValue then Exit;
FShowInfoLabel:=AValue;
if Assigned(FInfoLabel) then
FInfoLabel.Visible:=FShowInfoLabel;
end;
procedure TRxMDICloseButton.SetParent(AParent: TWinControl);
begin
inherited SetParent(AParent);
@ -232,6 +257,7 @@ begin
if FInfoLabel<>nil then exit;
FInfoLabel := TBoundLabel.Create(Self);
FInfoLabel.ControlStyle := FInfoLabel.ControlStyle + [csNoDesignSelectable];
FInfoLabel.Visible:=FShowInfoLabel;
end;
constructor TRxMDICloseButton.Create(AOwner: TComponent);
@ -239,6 +265,7 @@ begin
inherited Create(AOwner);
// FLabelPosition := lpAbove;
FLabelSpacing := 6;
FShowInfoLabel:=true;
CreateInternalLabel;
Glyph:=LoadLazResBitmapImage('RxMDICloseIcon');
end;
@ -251,6 +278,9 @@ begin
if Assigned(FCloseButton) then
begin
FCloseButton.Enabled:=Assigned(FCurrentChildWindow);
if FHideCloseButton then
FCloseButton.Visible:=FCloseButton.Enabled;
if FCloseButton.Enabled then
FCloseButton.FInfoLabel.Caption:=FCurrentChildWindow.Caption
else
@ -270,6 +300,19 @@ begin
end;
end;
procedure TRxMDIPanel.SetHideCloseButton(AValue: boolean);
begin
if FHideCloseButton=AValue then Exit;
FHideCloseButton:=AValue;
if Assigned(FCloseButton) then
if FHideCloseButton then
FCloseButton.Visible:=FCloseButton.Enabled
else
FCloseButton.Visible:=true;
end;
procedure TRxMDIPanel.SetRxMDICloseButton(AValue: TRxMDICloseButton);
begin
if FCloseButton=AValue then Exit;
@ -340,6 +383,12 @@ begin
end;
end;
procedure TRxMDIPanel.DoOnChangeCurrentChild(AForm: TForm);
begin
if Assigned(FOnChangeCurrentChild) then
FOnChangeCurrentChild(Self, AForm);
end;
procedure TRxMDIPanel.Notification(AComponent: TComponent; Operation: TOperation
);
begin
@ -382,7 +431,7 @@ procedure TRxMDIPanel.ChildWindowsAdd(F: TForm);
var
B:TRxMDIButton;
begin
Assert(Assigned(TaskPanel), 'Нет связанной панели задач');
Assert(Assigned(TaskPanel), sErrorLinkedTaskPanel);
HideCurrentWindow;
F.BorderStyle:=bsNone;
F.Align:=alClient;
@ -392,7 +441,7 @@ begin
Application.MainForm.ActiveControl:=F;
B:=TRxMDIButton.CreateButton(TaskPanel, F);
DoOnChangeCurrentChild(F);
end;
procedure TRxMDIPanel.ChildWindowsCreate(var AForm; FC: TFormClass);
@ -406,7 +455,11 @@ begin
ChildWindowsAdd(FForm);
end
else
ShowWindow(FForm)
begin
ShowWindow(FForm);
DoOnChangeCurrentChild(FForm);
end;
end;
procedure TRxMDIPanel.ChildWindowsUpdateCaption(F: TForm);
@ -587,8 +640,14 @@ procedure TRxMDITasks.Notification(AComponent: TComponent; Operation: TOperation
);
begin
inherited Notification(AComponent, Operation);
if (AComponent = FMainPanel) and (Operation = opRemove) then
if (Operation = opRemove) then
begin
if (AComponent = FMainPanel) then
FMainPanel := nil
else
if (AComponent is TRxMDIButton) then
Invalidate;
end;
end;
constructor TRxMDITasks.Create(TheOwner: TComponent);
@ -721,7 +780,6 @@ procedure TRxMDIButton.DoCloseMenu(Sender: TObject);
begin
if Assigned(FNavForm) then
FNavForm.Close;
// Application.ProcessMessages;
end;
procedure TRxMDIButton.DoCloseAllMenu(Sender: TObject);
@ -777,6 +835,20 @@ begin
Application.ReleaseComponent(Self);
end;
procedure TRxMDIButton.MouseDown(Button: TMouseButton; Shift: TShiftState; X,
Y: Integer);
begin
inherited MouseDown(Button, Shift, X, Y);
if Button = mbMiddle then
begin
if Assigned(Owner) then
begin
if rxtoMidleClickClose in (Owner as TRxMDITasks).Options then
DoCloseMenu(Self);
end;
end;
end;
procedure TRxMDIButton.Notification(AComponent: TComponent;
Operation: TOperation);
begin
@ -813,6 +885,9 @@ begin
FNavPanel.FMainPanel.CurrentChildWindow:=NavForm;
if Assigned(FActiveControl) and FActiveControl.HandleObjectShouldBeVisible then
FActiveControl.SetFocus;
if Assigned(FNavPanel.FMainPanel) then
FNavPanel.FMainPanel.DoOnChangeCurrentChild(FNavForm);
end;
Down:=true;
end;

View File

@ -5513,7 +5513,6 @@ end;
procedure TRxDBGrid.FFilterListEditorOnChange(Sender: TObject);
begin
FFilterListEditor.Hide;
// if FFilterListEditor.mod
with TRxColumn(Columns[Columns.RealIndex(FFilterListEditor.Col)]).Filter do
begin
if (FFilterListEditor.Text = EmptyValue) then
@ -5523,7 +5522,7 @@ begin
State:=rxfsEmpty;}
end
else
if (FFilterListEditor.Text = AllValue) or (FFilterListEditor.Text = '') then
if (FFilterListEditor.Text = AllValue) {or (FFilterListEditor.Text = '')} then
begin
ClearFilter;
State:=rxfsAll;

View File

@ -109,6 +109,7 @@ resourcestring
sCloseWindows = 'Close window';
sCloseAllExceptThis = 'Close all except this';
sCloseAllWindows = 'Close all windows';
sErrorLinkedTaskPanel = 'Not assigned task panel';//Нет связанной панели задач';
{ TRxDateRangeEdit }
sFirstQuarter = 'First quarter';