开发者

Ensuring column visibility in wxListCtrl

I want wxListCtrl in report mode and I want to lock one or more columns such that when you scroll left and开发者_如何学JAVA right those columns remain visible at all times. For example:

| name | field1 | field2 | field3 |....|

When scrolled to the left I want it to be like:

| name | field3 | field 4 | ... |

I can't find a way to get this functionality.

I looked at wxGrid and it would if I set the row label to the name value, but first that's not exactly what is desired and second it makes the name non-editable. I need it to be editable.

There a way to get what I want?


I suggest faking it by using two controls side by side. One would hold the the non-scrolling column(s), the other would scroll. By carefully aligning them with minimal margins, they would look, at a glance, like one control. By handling the vertical scroll events in the parent, the vertical scrolling of both can be synchronized.

I would definitely use wxGrid rather than wxListCtrl since you get access to a much richer feature set.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜