如何在Delphi中通过制表符或箭头键在字符串网格的单元格之间移动?如你所知,delphi中的一个字符串网格只有一个tab键顺序,但我需要通过箭头键或tab键在单元格之间移动,以便更加舒适和用户友好。delphi:在字符串网格的单元格之间移动
我试图用一个按键事件,但这个事件只知道个字符,不知道像标签控制键和...
如何在Delphi中通过制表符或箭头键在字符串网格的单元格之间移动?如你所知,delphi中的一个字符串网格只有一个tab键顺序,但我需要通过箭头键或tab键在单元格之间移动,以便更加舒适和用户友好。delphi:在字符串网格的单元格之间移动
我试图用一个按键事件,但这个事件只知道个字符,不知道像标签控制键和...
{ This handles arrow left and right in the GRID
}
procedure TJournalForm.JournalGridKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
if (JournalGrid.EditorMode = True) then // if arrowing while editing…
begin
if Key=VK_Left then if JournalGrid.Col>(JournalGrid.FixedCols+1) then JournalGrid.Col:=JournalGrid.Col-1;
if Key=VK_Right then if JournalGrid.Col<(JournalGrid.ColCount-1) then JournalGrid.Col:=JournalGrid.Col+1;
end;
end;
在为Col属性设置新值之前设置EditorMode:= false。 –
关于错误:http://meta.stackexchange.com/questions/92074/what-can-i-do-when-getting-it-does-not-meet-our-quality-standards –