我有一个大网格,其中有很多行和很多窄列。我希望通过以与突出显示当前行相同的方式突出显示当前列来更轻松地查看选择了哪列。
我尝试使用 GetContentStyle
事件,但似乎只有选定的行被重新绘制,所以效果不太好...
有人知道如何在 ExpressQuantumGrid 中突出显示所选列吗?
最佳答案
我最终得到的解决方案是每当焦点在列之间移动时强制重新绘制。这不是我喜欢的解决方案...至少它应该能够仅使相关列无效...
procedure TForm1.gridViewStylesGetContentStyle(
Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord;
AItem: TcxCustomGridTableItem; var AStyle: TcxStyle);
begin
if (AItem is TcxGridBandedColumn) and
(Sender.Controller.FocusedItem = AItem) then
begin
AStyle := DataManager.cxStyleSelected
end;
end;
procedure TForm1.gridViewByGoalFocusedItemChanged(
Sender: TcxCustomGridTableView; APrevFocusedItem,
AFocusedItem: TcxCustomGridTableItem);
begin
Sender.Invalidate(true);
end;
关于delphi - “十字线”-ExpressQuantumGrid 中选定单元格的突出显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23612969/