You've already forked lazarus-ccr
Fixed focus issues
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2333 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -3,7 +3,11 @@ JUJIBOUTILS
|
|||||||
|
|
||||||
Note: Lazarus Trunk required
|
Note: Lazarus Trunk required
|
||||||
|
|
||||||
Version pre-1.0
|
Version pre-1.1
|
||||||
|
--------------------------------------------------
|
||||||
|
2012-03-06 Fixed: Focus issues
|
||||||
|
|
||||||
|
Version 1.0
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
2011-10-14 Released jujiboutils 1.0
|
2011-10-14 Released jujiboutils 1.0
|
||||||
2011-09-30 Added: ftString support to TJDBGridControl. MaxLength property.
|
2011-09-30 Added: ftString support to TJDBGridControl. MaxLength property.
|
||||||
|
@ -430,6 +430,9 @@ end;
|
|||||||
|
|
||||||
function TJDbGridDateTimeCtrl.CanDefocus: boolean;
|
function TJDbGridDateTimeCtrl.CanDefocus: boolean;
|
||||||
begin
|
begin
|
||||||
|
if not updated then
|
||||||
|
Result:= True
|
||||||
|
else
|
||||||
if CellEditor.Focused and (Length(CellEditor.Text) = 0) then
|
if CellEditor.Focused and (Length(CellEditor.Text) = 0) then
|
||||||
Result := True
|
Result := True
|
||||||
else
|
else
|
||||||
@ -604,6 +607,9 @@ end;
|
|||||||
|
|
||||||
function TJDbGridTimeCtrl.CanDefocus: boolean;
|
function TJDbGridTimeCtrl.CanDefocus: boolean;
|
||||||
begin
|
begin
|
||||||
|
if not updated then
|
||||||
|
Result:= True
|
||||||
|
else
|
||||||
if CellEditor.Focused and (Length(CellEditor.Text) = 0) then
|
if CellEditor.Focused and (Length(CellEditor.Text) = 0) then
|
||||||
Result := True
|
Result := True
|
||||||
else
|
else
|
||||||
@ -780,6 +786,9 @@ end;
|
|||||||
|
|
||||||
function TJDbGridDateCtrl.CanDefocus: boolean;
|
function TJDbGridDateCtrl.CanDefocus: boolean;
|
||||||
begin
|
begin
|
||||||
|
if not updated then
|
||||||
|
Result:= True
|
||||||
|
else
|
||||||
if CellEditor.Focused and (Length(CellEditor.Text) = 0) then
|
if CellEditor.Focused and (Length(CellEditor.Text) = 0) then
|
||||||
Result := True
|
Result := True
|
||||||
else
|
else
|
||||||
|
@ -66,6 +66,7 @@ type
|
|||||||
procedure KeyDown(var Key: word; Shift: TShiftState); override;
|
procedure KeyDown(var Key: word; Shift: TShiftState); override;
|
||||||
procedure KeyPress(var Key: char); override;
|
procedure KeyPress(var Key: char); override;
|
||||||
procedure DoEnter; override;
|
procedure DoEnter; override;
|
||||||
|
procedure DoExit; override;
|
||||||
function GetReadOnly: boolean; override;
|
function GetReadOnly: boolean; override;
|
||||||
procedure SetReadOnly(Value: boolean); override;
|
procedure SetReadOnly(Value: boolean); override;
|
||||||
|
|
||||||
@ -358,6 +359,12 @@ begin
|
|||||||
inherited DoEnter;
|
inherited DoEnter;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TJDBLabeledCurrencyEdit.DoExit;
|
||||||
|
begin
|
||||||
|
formatInput;
|
||||||
|
inherited DoExit;
|
||||||
|
end;
|
||||||
|
|
||||||
constructor TJDBLabeledCurrencyEdit.Create(TheOwner: TComponent);
|
constructor TJDBLabeledCurrencyEdit.Create(TheOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited Create(TheOwner);
|
inherited Create(TheOwner);
|
||||||
|
@ -27,6 +27,9 @@ uses
|
|||||||
SysUtils, jinputconsts;
|
SysUtils, jinputconsts;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
{ TJDBLabeledFloatEdit }
|
||||||
|
|
||||||
TJDBLabeledFloatEdit = class(TCustomLabeledEdit)
|
TJDBLabeledFloatEdit = class(TCustomLabeledEdit)
|
||||||
private
|
private
|
||||||
fFormat: string;
|
fFormat: string;
|
||||||
@ -63,6 +66,7 @@ type
|
|||||||
procedure KeyDown(var Key: word; Shift: TShiftState); override;
|
procedure KeyDown(var Key: word; Shift: TShiftState); override;
|
||||||
procedure KeyPress(var Key: char); override;
|
procedure KeyPress(var Key: char); override;
|
||||||
procedure DoEnter; override;
|
procedure DoEnter; override;
|
||||||
|
procedure DoExit; override;
|
||||||
function GetReadOnly: boolean; override;
|
function GetReadOnly: boolean; override;
|
||||||
procedure SetReadOnly(Value: boolean); override;
|
procedure SetReadOnly(Value: boolean); override;
|
||||||
|
|
||||||
@ -353,6 +357,12 @@ begin
|
|||||||
inherited DoEnter;
|
inherited DoEnter;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TJDBLabeledFloatEdit.DoExit;
|
||||||
|
begin
|
||||||
|
formatInput;
|
||||||
|
inherited DoExit;
|
||||||
|
end;
|
||||||
|
|
||||||
constructor TJDBLabeledFloatEdit.Create(TheOwner: TComponent);
|
constructor TJDBLabeledFloatEdit.Create(TheOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited Create(TheOwner);
|
inherited Create(TheOwner);
|
||||||
|
@ -62,6 +62,7 @@ type
|
|||||||
procedure KeyDown(var Key: word; Shift: TShiftState); override;
|
procedure KeyDown(var Key: word; Shift: TShiftState); override;
|
||||||
procedure KeyPress(var Key: char); override;
|
procedure KeyPress(var Key: char); override;
|
||||||
procedure DoEnter; override;
|
procedure DoEnter; override;
|
||||||
|
procedure DoExit; override;
|
||||||
function GetReadOnly: boolean; override;
|
function GetReadOnly: boolean; override;
|
||||||
procedure SetReadOnly(Value: boolean); override;
|
procedure SetReadOnly(Value: boolean); override;
|
||||||
|
|
||||||
@ -319,6 +320,12 @@ begin
|
|||||||
inherited DoEnter;
|
inherited DoEnter;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TJDBLabeledIntegerEdit.DoExit;
|
||||||
|
begin
|
||||||
|
formatInput;
|
||||||
|
inherited DoExit;
|
||||||
|
end;
|
||||||
|
|
||||||
constructor TJDBLabeledIntegerEdit.Create(TheOwner: TComponent);
|
constructor TJDBLabeledIntegerEdit.Create(TheOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited Create(TheOwner);
|
inherited Create(TheOwner);
|
||||||
|
Reference in New Issue
Block a user