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
|
||||
end
|
||||
else
|
||||
if Key in [VK_UP, VK_DOWN] then
|
||||
begin
|
||||
Key := VK_UNKNOWN;
|
||||
end
|
||||
else
|
||||
if Key in [VK_RETURN, VK_TAB, VK_RIGHT, VK_LEFT] then
|
||||
//if Key in [VK_UP, VK_DOWN] then
|
||||
//begin
|
||||
// Key := VK_UNKNOWN;
|
||||
//end
|
||||
//else
|
||||
if Key in [VK_RETURN, VK_TAB, VK_UP, VK_DOWN] then
|
||||
begin
|
||||
Field.DataSet.Edit;
|
||||
Field.AsString := CellEditor.Text;
|
||||
@@ -378,12 +378,12 @@ begin
|
||||
theGrid.SetFocus; // No perder el foco
|
||||
end
|
||||
else
|
||||
if Key in [VK_UP, VK_DOWN] then
|
||||
begin
|
||||
Key := VK_UNKNOWN;
|
||||
end
|
||||
else
|
||||
if Key in [VK_RETURN, VK_TAB, VK_RIGHT, VK_LEFT] then
|
||||
//if Key in [VK_UP, VK_DOWN] then
|
||||
//begin
|
||||
// Key := VK_UNKNOWN;
|
||||
//end
|
||||
//else
|
||||
if Key in [VK_RETURN, VK_TAB, VK_UP, VK_DOWN] then
|
||||
begin
|
||||
CellEditor.Caption := NormalizeDateTime(CellEditor.Caption, theValue);
|
||||
if Length(CellEditor.Caption) = 0 then
|
||||
@@ -552,12 +552,12 @@ begin
|
||||
theGrid.SetFocus; // No perder el foco
|
||||
end
|
||||
else
|
||||
if Key in [VK_UP, VK_DOWN] then
|
||||
begin
|
||||
Key := VK_UNKNOWN;
|
||||
end
|
||||
else
|
||||
if Key in [VK_RETURN, VK_TAB, VK_RIGHT, VK_LEFT] then
|
||||
//if Key in [VK_UP, VK_DOWN] then
|
||||
//begin
|
||||
// Key := VK_UNKNOWN;
|
||||
//end
|
||||
//else
|
||||
if Key in [VK_RETURN, VK_TAB, VK_UP, VK_DOWN] then
|
||||
begin
|
||||
CellEditor.Caption := NormalizeTime(CellEditor.Caption, theValue);
|
||||
if Length(CellEditor.Caption) = 0 then
|
||||
@@ -727,12 +727,12 @@ begin
|
||||
theGrid.SetFocus; // No perder el foco
|
||||
end
|
||||
else
|
||||
if Key in [VK_UP, VK_DOWN] then
|
||||
begin
|
||||
Key := VK_UNKNOWN;
|
||||
end
|
||||
else
|
||||
if Key in [VK_RETURN, VK_TAB, VK_RIGHT, VK_LEFT] then
|
||||
//if Key in [VK_UP, VK_DOWN] then
|
||||
//begin
|
||||
// Key := VK_UNKNOWN;
|
||||
//end
|
||||
//else
|
||||
if Key in [VK_RETURN, VK_TAB, VK_UP, VK_DOWN] then
|
||||
begin
|
||||
CellEditor.Caption := NormalizeDate(CellEditor.Caption, theValue);
|
||||
if Length(CellEditor.Caption) = 0 then
|
||||
@@ -876,12 +876,12 @@ begin
|
||||
theGrid.SetFocus; // No perder el foco
|
||||
end
|
||||
else
|
||||
if key in [VK_UP, VK_DOWN] then
|
||||
begin
|
||||
Key := VK_UNKNOWN;
|
||||
end
|
||||
else
|
||||
if Key in [VK_RETURN, VK_TAB] then
|
||||
//if key in [VK_UP, VK_DOWN] then
|
||||
//begin
|
||||
// Key := VK_UNKNOWN;
|
||||
//end
|
||||
//else
|
||||
if Key in [VK_RETURN, VK_TAB, VK_UP, VK_DOWN] then
|
||||
begin
|
||||
if IsValidFloat(CellEditor.Caption) then
|
||||
begin
|
||||
@@ -889,8 +889,7 @@ begin
|
||||
Field.DataSet.Edit;
|
||||
if decimals > 0 then
|
||||
theValue := ScaleTo(theValue, fDecimals);
|
||||
Field.Value := theValue;
|
||||
;
|
||||
Field.Value := theValue; ;
|
||||
CellEditor.Text := Field.AsString;
|
||||
updated := True;
|
||||
end;
|
||||
@@ -987,12 +986,12 @@ begin
|
||||
theGrid.SetFocus; // No perder el foco
|
||||
end
|
||||
else
|
||||
if key in [VK_UP, VK_DOWN] then
|
||||
begin
|
||||
Key := VK_UNKNOWN;
|
||||
end
|
||||
else
|
||||
if Key in [VK_RETURN, VK_TAB] then
|
||||
//if key in [VK_UP, VK_DOWN] then
|
||||
//begin
|
||||
// Key := VK_UNKNOWN;
|
||||
//end
|
||||
//else
|
||||
if Key in [VK_RETURN, VK_TAB, VK_UP, VK_DOWN] then
|
||||
begin
|
||||
if IsValidInteger(CellEditor.Caption) then
|
||||
begin
|
||||
|
Reference in New Issue
Block a user