如何在运行时更改TcxGridColumn的PopupWidth?

时间:2017-09-19 17:47:05

标签: delphi devexpress tcxgrid

我正在使用TcxGridColumn作为备忘录(blobEditKinf = bekMemo),PopupHeight上的属性PopupWidthRepositoryItem固定为200/250 ,如果我无法在代码中访问这些属性,如何在运行时将其更改为其他值:

MyColumn.RepositoryItem.Properties

1 个答案:

答案 0 :(得分:3)

您可以通过对列procedure TForm1.FormCreate(Sender: TObject); begin [...] if cxGrid1DBTableView1Description.Properties is TcxBlobEditProperties then begin TcxBlobEditProperties(cxGrid1DBTableView1Description.Properties).PopUpWidth := 500; TcxBlobEditProperties(cxGrid1DBTableView1Description.Properties).PopUpHeight := 500; end; end; 属性进行适当的转换来轻松完成此操作。 在下文中,我的BlobEdit列用于Properties备注字段 一个TClientDataSet:

EL = c(1,7,2,6,3,8,2,5,4,6,1,5,2,6)
types = rep(0:1, each=4)
g = make_bipartite_graph(types, EL, directed = TRUE)
g = set_vertex_attr(g, "label", value = rep(c('off','low','medium', 'strong'), 2))
LO = matrix(c(1,1,1,2,1,3,1,4,2,1,2,2,2,3,2,4), 
    nrow=8, ncol=2, byrow=TRUE)
plot(g, layout = LO)

许多TcxGrid列编辑器具有{{1}}类型,具有特定于类型的子属性,您可以通过与上述类似的方式访问这些属性。