You've already forked lazarus-ccr
Enable VK_UP and VK_DOWN for cell editing because it's working fine with TJDBGridControl
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2069 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -223,12 +223,12 @@ begin
|
|||||||
theGrid.SetFocus; // No perder el foco
|
theGrid.SetFocus; // No perder el foco
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if Key in [VK_UP, VK_DOWN] then
|
//if Key in [VK_UP, VK_DOWN] then
|
||||||
begin
|
//begin
|
||||||
Key := VK_UNKNOWN;
|
// Key := VK_UNKNOWN;
|
||||||
end
|
//end
|
||||||
else
|
//else
|
||||||
if Key in [VK_RETURN, VK_TAB, VK_RIGHT, VK_LEFT] then
|
if Key in [VK_RETURN, VK_TAB, VK_UP, VK_DOWN] then
|
||||||
begin
|
begin
|
||||||
Field.DataSet.Edit;
|
Field.DataSet.Edit;
|
||||||
Field.AsString := CellEditor.Text;
|
Field.AsString := CellEditor.Text;
|
||||||
@@ -378,12 +378,12 @@ begin
|
|||||||
theGrid.SetFocus; // No perder el foco
|
theGrid.SetFocus; // No perder el foco
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if Key in [VK_UP, VK_DOWN] then
|
//if Key in [VK_UP, VK_DOWN] then
|
||||||
begin
|
//begin
|
||||||
Key := VK_UNKNOWN;
|
// Key := VK_UNKNOWN;
|
||||||
end
|
//end
|
||||||
else
|
//else
|
||||||
if Key in [VK_RETURN, VK_TAB, VK_RIGHT, VK_LEFT] then
|
if Key in [VK_RETURN, VK_TAB, VK_UP, VK_DOWN] then
|
||||||
begin
|
begin
|
||||||
CellEditor.Caption := NormalizeDateTime(CellEditor.Caption, theValue);
|
CellEditor.Caption := NormalizeDateTime(CellEditor.Caption, theValue);
|
||||||
if Length(CellEditor.Caption) = 0 then
|
if Length(CellEditor.Caption) = 0 then
|
||||||
@@ -552,12 +552,12 @@ begin
|
|||||||
theGrid.SetFocus; // No perder el foco
|
theGrid.SetFocus; // No perder el foco
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if Key in [VK_UP, VK_DOWN] then
|
//if Key in [VK_UP, VK_DOWN] then
|
||||||
begin
|
//begin
|
||||||
Key := VK_UNKNOWN;
|
// Key := VK_UNKNOWN;
|
||||||
end
|
//end
|
||||||
else
|
//else
|
||||||
if Key in [VK_RETURN, VK_TAB, VK_RIGHT, VK_LEFT] then
|
if Key in [VK_RETURN, VK_TAB, VK_UP, VK_DOWN] then
|
||||||
begin
|
begin
|
||||||
CellEditor.Caption := NormalizeTime(CellEditor.Caption, theValue);
|
CellEditor.Caption := NormalizeTime(CellEditor.Caption, theValue);
|
||||||
if Length(CellEditor.Caption) = 0 then
|
if Length(CellEditor.Caption) = 0 then
|
||||||
@@ -727,12 +727,12 @@ begin
|
|||||||
theGrid.SetFocus; // No perder el foco
|
theGrid.SetFocus; // No perder el foco
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if Key in [VK_UP, VK_DOWN] then
|
//if Key in [VK_UP, VK_DOWN] then
|
||||||
begin
|
//begin
|
||||||
Key := VK_UNKNOWN;
|
// Key := VK_UNKNOWN;
|
||||||
end
|
//end
|
||||||
else
|
//else
|
||||||
if Key in [VK_RETURN, VK_TAB, VK_RIGHT, VK_LEFT] then
|
if Key in [VK_RETURN, VK_TAB, VK_UP, VK_DOWN] then
|
||||||
begin
|
begin
|
||||||
CellEditor.Caption := NormalizeDate(CellEditor.Caption, theValue);
|
CellEditor.Caption := NormalizeDate(CellEditor.Caption, theValue);
|
||||||
if Length(CellEditor.Caption) = 0 then
|
if Length(CellEditor.Caption) = 0 then
|
||||||
@@ -876,12 +876,12 @@ begin
|
|||||||
theGrid.SetFocus; // No perder el foco
|
theGrid.SetFocus; // No perder el foco
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if key in [VK_UP, VK_DOWN] then
|
//if key in [VK_UP, VK_DOWN] then
|
||||||
begin
|
//begin
|
||||||
Key := VK_UNKNOWN;
|
// Key := VK_UNKNOWN;
|
||||||
end
|
//end
|
||||||
else
|
//else
|
||||||
if Key in [VK_RETURN, VK_TAB] then
|
if Key in [VK_RETURN, VK_TAB, VK_UP, VK_DOWN] then
|
||||||
begin
|
begin
|
||||||
if IsValidFloat(CellEditor.Caption) then
|
if IsValidFloat(CellEditor.Caption) then
|
||||||
begin
|
begin
|
||||||
@@ -889,8 +889,7 @@ begin
|
|||||||
Field.DataSet.Edit;
|
Field.DataSet.Edit;
|
||||||
if decimals > 0 then
|
if decimals > 0 then
|
||||||
theValue := ScaleTo(theValue, fDecimals);
|
theValue := ScaleTo(theValue, fDecimals);
|
||||||
Field.Value := theValue;
|
Field.Value := theValue; ;
|
||||||
;
|
|
||||||
CellEditor.Text := Field.AsString;
|
CellEditor.Text := Field.AsString;
|
||||||
updated := True;
|
updated := True;
|
||||||
end;
|
end;
|
||||||
@@ -987,12 +986,12 @@ begin
|
|||||||
theGrid.SetFocus; // No perder el foco
|
theGrid.SetFocus; // No perder el foco
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if key in [VK_UP, VK_DOWN] then
|
//if key in [VK_UP, VK_DOWN] then
|
||||||
begin
|
//begin
|
||||||
Key := VK_UNKNOWN;
|
// Key := VK_UNKNOWN;
|
||||||
end
|
//end
|
||||||
else
|
//else
|
||||||
if Key in [VK_RETURN, VK_TAB] then
|
if Key in [VK_RETURN, VK_TAB, VK_UP, VK_DOWN] then
|
||||||
begin
|
begin
|
||||||
if IsValidInteger(CellEditor.Caption) then
|
if IsValidInteger(CellEditor.Caption) then
|
||||||
begin
|
begin
|
||||||
|
Reference in New Issue
Block a user