gpt4 book ai didi

delphi - “十字线”-ExpressQuantumGrid 中选定单元格的突出显示

转载 作者:行者123 更新时间:2023-12-03 15:58:09 27 4
gpt4 key购买 nike

我有一个大网格,其中有很多行和很多窄列。我希望通过以与突出显示当前行相同的方式突出显示当前列来更轻松地查看选择了哪列。

我尝试使用 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/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com