//参考如下代码--uses Clipbrd; function StringGridSelectText(mStringGrid: TStringGrid): string;var I, J: Integer; S: string;begin Result := ''; if not Assigned(mStringGrid) then Exit; for J := mStringGrid.Selection.Top to mStringGrid.Selection.Bottom d
procedure TForm1.Stringgrid1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState); begin with Sender as TStringGrid do begin Canvas.FillRect(Rect); DrawText(Canvas.Handle, Pchar(Cells[ACol, ARow]), Length(Cells[ACol, ARow
//GRID里回车替换TABfunction cellkeydown(sender, td, cellIndex, record, tr, rowIndex, e, eOpts){ if (e.getKey()==13){var a=sender.editingPlugin;a.startEdit(record.index,cellIndex+1);}} 动态添加clientevents,实现按回车向右移动: if unidbgrid1.ClientEvents.ExtEvents.Value