You've already forked lazarus-ccr
RxFPC: TRxColumnEditButton add new property - Enabled.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4192 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -365,6 +365,7 @@ type
|
|||||||
|
|
||||||
TRxColumnEditButton = class(TCollectionItem)
|
TRxColumnEditButton = class(TCollectionItem)
|
||||||
private
|
private
|
||||||
|
FEnabled: Boolean;
|
||||||
FShortCut: TShortCut;
|
FShortCut: TShortCut;
|
||||||
FStyle: TRxColumnEditButtonStyle;
|
FStyle: TRxColumnEditButtonStyle;
|
||||||
FButton:TSpeedButton;
|
FButton:TSpeedButton;
|
||||||
@@ -393,6 +394,7 @@ type
|
|||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
published
|
published
|
||||||
//property DropdownMenu: TPopupMenu read FDropdownMenu write FDropdownMenu; :TODO:
|
//property DropdownMenu: TPopupMenu read FDropdownMenu write FDropdownMenu; :TODO:
|
||||||
|
property Enabled: Boolean read FEnabled write FEnabled default true;
|
||||||
property Glyph: TBitmap read GetGlyph write SetGlyph;
|
property Glyph: TBitmap read GetGlyph write SetGlyph;
|
||||||
property Hint: String read GetHint write SetHint;
|
property Hint: String read GetHint write SetHint;
|
||||||
property NumGlyphs: Integer read GetNumGlyphs write SetNumGlyphs default 1;
|
property NumGlyphs: Integer read GetNumGlyphs write SetNumGlyphs default 1;
|
||||||
@@ -566,8 +568,6 @@ type
|
|||||||
FOldPosition: Integer;
|
FOldPosition: Integer;
|
||||||
FVersion: integer;
|
FVersion: integer;
|
||||||
FPropertyStorageLink: TPropertyStorageLink;
|
FPropertyStorageLink: TPropertyStorageLink;
|
||||||
FRxDbGridLookupComboEditor: TCustomControl;
|
|
||||||
FRxDbGridDateEditor: TWinControl;
|
|
||||||
|
|
||||||
FAfterQuickSearch: TRxQuickSearchNotifyEvent;
|
FAfterQuickSearch: TRxQuickSearchNotifyEvent;
|
||||||
FBeforeQuickSearch: TRxQuickSearchNotifyEvent;
|
FBeforeQuickSearch: TRxQuickSearchNotifyEvent;
|
||||||
@@ -642,6 +642,8 @@ type
|
|||||||
procedure AddTools(ATools:TRxDBGridAbstractTools);
|
procedure AddTools(ATools:TRxDBGridAbstractTools);
|
||||||
procedure RemoveTools(ATools:TRxDBGridAbstractTools);
|
procedure RemoveTools(ATools:TRxDBGridAbstractTools);
|
||||||
protected
|
protected
|
||||||
|
FRxDbGridLookupComboEditor: TCustomControl;
|
||||||
|
FRxDbGridDateEditor: TWinControl;
|
||||||
//procedure UpdateHorzScrollBar(const aVisible: boolean; const aRange,aPage,aPos: Integer); override;
|
//procedure UpdateHorzScrollBar(const aVisible: boolean; const aRange,aPage,aPos: Integer); override;
|
||||||
//procedure UpdateVertScrollbar(const aVisible: boolean; const aRange,aPage,aPos: Integer); override;
|
//procedure UpdateVertScrollbar(const aVisible: boolean; const aRange,aPage,aPos: Integer); override;
|
||||||
|
|
||||||
@@ -1316,6 +1318,7 @@ begin
|
|||||||
FSpinBtn.OnTopClick:=@DoTopClick;
|
FSpinBtn.OnTopClick:=@DoTopClick;
|
||||||
|
|
||||||
FVisible:=true;
|
FVisible:=true;
|
||||||
|
FEnabled:=true;
|
||||||
Width:=15;
|
Width:=15;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -1559,8 +1562,16 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRxDBGridDateEditor.msg_SetValue(var Msg: TGridMessage);
|
procedure TRxDBGridDateEditor.msg_SetValue(var Msg: TGridMessage);
|
||||||
|
var
|
||||||
|
D: TDateTime;
|
||||||
begin
|
begin
|
||||||
Self.Date := FGrid.SelectedField.AsDateTime;
|
if FGrid.SelectedField.DataType in [ftDate, ftDateTime] then
|
||||||
|
Self.Date := FGrid.SelectedField.AsDateTime
|
||||||
|
else
|
||||||
|
if TryStrToDateTime(FGrid.SelectedField.AsString, D) then
|
||||||
|
Self.Date := D
|
||||||
|
else
|
||||||
|
Self.Clear;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRxDBGridDateEditor.msg_GetValue(var Msg: TGridMessage);
|
procedure TRxDBGridDateEditor.msg_GetValue(var Msg: TGridMessage);
|
||||||
@@ -1583,14 +1594,6 @@ begin
|
|||||||
UpdateMask;
|
UpdateMask;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{
|
|
||||||
procedure TRxDBGridDateEditor.SetBounds(aLeft, aTop, aWidth, aHeight: integer);
|
|
||||||
begin
|
|
||||||
Dec(aWidth, 25); //ButtonWidth);
|
|
||||||
inherited SetBounds(aLeft, aTop, aWidth, aHeight);
|
|
||||||
end; }
|
|
||||||
|
|
||||||
|
|
||||||
procedure TRxDBGridDateEditor.EditingDone;
|
procedure TRxDBGridDateEditor.EditingDone;
|
||||||
begin
|
begin
|
||||||
inherited EditingDone;
|
inherited EditingDone;
|
||||||
@@ -2865,7 +2868,7 @@ begin
|
|||||||
W:=0;
|
W:=0;
|
||||||
for i:=0 to R.EditButtons.Count-1 do
|
for i:=0 to R.EditButtons.Count-1 do
|
||||||
begin
|
begin
|
||||||
if R.EditButtons[i].Visible then
|
if R.EditButtons[i].Visible and R.EditButtons[i].Enabled then
|
||||||
W:=W+R.EditButtons[i].Width;
|
W:=W+R.EditButtons[i].Width;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -2883,7 +2886,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
for i:=0 to R.EditButtons.Count-1 do
|
for i:=0 to R.EditButtons.Count-1 do
|
||||||
if R.EditButtons[i].Visible then
|
if R.EditButtons[i].Visible and R.EditButtons[i].Enabled then
|
||||||
begin
|
begin
|
||||||
if R.EditButtons[i].Style = ebsUpDownRx then
|
if R.EditButtons[i].Style = ebsUpDownRx then
|
||||||
begin
|
begin
|
||||||
|
Reference in New Issue
Block a user