From 0d17bef28edff78f7046e04a0e5b031fdcc3815b Mon Sep 17 00:00:00 2001 From: alexs75 Date: Mon, 3 May 2010 11:05:23 +0000 Subject: [PATCH] new event for RxLockupCombo, russian documentation git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1215 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/rx/docs/rxfpc.xml | 17 +++++++++++++++++ components/rx/rxlookup.pas | 21 ++++++++++++++------- 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/components/rx/docs/rxfpc.xml b/components/rx/docs/rxfpc.xml index 40af5d4d4..bd0bf3ff7 100644 --- a/components/rx/docs/rxfpc.xml +++ b/components/rx/docs/rxfpc.xml @@ -159,6 +159,7 @@ + RxDBGrid-а.

@@ -558,6 +559,7 @@ + RxDBGrid-а.

@@ -1038,6 +1040,12 @@ TRxDBLookupCombo позволяет использовать в качестве

The RxLookup unit contains the declarations for the certain components on the RX DBAware page of the Component palette and their associated objects, types, and constants. When you add a component declared in this unit to a form, the unit is automatically added to the uses clause of that form's unit.

+ + Событие возникает при закрытии PopUp окна выбора данных. + + + Событие возникает при закрытии PopUp окна выбора данных. + @@ -1107,6 +1115,7 @@ TRxDBCalcEdit является наследником TDBCalcEdit и имеет + Count @@ -2382,6 +2391,7 @@ Description + const SearchDomain, FileName: @@ -2400,6 +2410,7 @@ Description + String; @@ -2418,6 +2429,7 @@ Description + out UserName, DomainName: @@ -2436,6 +2448,7 @@ Description + String);

Процедура возвращает имя и домен пользователя операционной системы владельца указанного файла.

@@ -2471,6 +2484,7 @@ Description + const DirName: @@ -2483,6 +2497,7 @@ Description + string): @@ -2495,6 +2510,7 @@ Description + string;

Функция проверяет все разделители каталогов в указанном имени файла/каталога и, если нужно, меняет их на значение константыDirectorySeparator.

@@ -2521,6 +2537,7 @@ Description + string;

Функция GetUserName возвращает имя оператора, залогиненго в системе

diff --git a/components/rx/rxlookup.pas b/components/rx/rxlookup.pas index 05208f04e..75a6b9634 100644 --- a/components/rx/rxlookup.pas +++ b/components/rx/rxlookup.pas @@ -165,6 +165,7 @@ type FEmptyItemColor: TColor; FEmptyValue: string; FOnChange: TNotifyEvent; + FOnClosePopup: TClosePopup; FPopUpFormOptions: TPopUpFormOptions; // FRxPopUpForm:TPopUpForm; @@ -238,7 +239,7 @@ type procedure CalculatePreferredSize(var PreferredWidth, PreferredHeight: integer; WithThemeSpace: Boolean); override; procedure ShowList; virtual; - procedure OnClosePopup(AResult:boolean);virtual; + procedure OnInternalClosePopup(AResult:boolean);virtual; procedure SetEnabled(Value: Boolean); override; procedure KeyDown(var Key: Word; Shift: TShiftState); override; procedure KeyPress(var Key: char); override; @@ -291,6 +292,7 @@ type property Value: string read FValue write SetValue stored False; property KeyValue: Variant read GetKeyValue write SetKeyValue stored False; property OnSelect: TNotifyEvent read FOnSelect write FOnSelect; + property OnClosePopup:TClosePopup read FOnClosePopup write FOnClosePopup; property UnfindedValue : TRxDBValueVariant read FUnfindedValue write FUnfindedValue default rxufNone; public @@ -302,7 +304,7 @@ type { TRxDBLookupCombo } TRxDBLookupCombo = class(TRxCustomDBLookupCombo) protected - procedure OnClosePopup(AResult:boolean);override; + procedure OnInternalClosePopup(AResult:boolean);override; public property Value; property KeyValue; @@ -332,6 +334,7 @@ type Property OnButtonClick; property OnChange; property OnClick; + property OnClosePopup; property OnDblClick; property OnDragDrop; property OnDragOver; @@ -1054,12 +1057,12 @@ begin if FLookupDataLink.Active then FLookupDataLink.DataSet.First; - FRxPopUpForm:=ShowRxDBPopUpForm(Self, FLookupDataLink.DataSet, @OnClosePopup, + FRxPopUpForm:=ShowRxDBPopUpForm(Self, FLookupDataLink.DataSet, @OnInternalClosePopup, FPopUpFormOptions, FLookupDisplay, LookupDisplayIndex, 0 {ButtonWidth}, Font); {$IFDEF LINUX} TempF:=FRxPopUpForm; if FRxPopUpForm.ShowModal = mrOk then - OnClosePopup(true); + OnInternalClosePopup(true); TempF.Free; FRxPopUpForm:=nil {$ENDIF} @@ -1143,16 +1146,20 @@ begin end; end; -procedure TRxCustomDBLookupCombo.OnClosePopup(AResult: boolean); +procedure TRxCustomDBLookupCombo.OnInternalClosePopup(AResult: boolean); begin if Assigned(FRxPopUpForm) and AResult and (pfgColumnResize in FPopUpFormOptions.Options) then FillPopupWidth(FPopUpFormOptions, FRxPopUpForm); + if Assigned(FOnClosePopup) then + FOnClosePopup(Self, AResult); + if FRxPopUpForm=nil then begin SetFocus; Exit; end; + FRxPopUpForm:=nil; if not AResult then UpdateKeyValue @@ -1638,9 +1645,9 @@ end; { TRxDBLookupCombo } -procedure TRxDBLookupCombo.OnClosePopup(AResult: boolean); +procedure TRxDBLookupCombo.OnInternalClosePopup(AResult: boolean); begin - inherited OnClosePopup(AResult); + inherited OnInternalClosePopup(AResult); // SetFocus; { if (Owner is TWinControl) then TWinControl(Owner).Repaint