tags:

views:

16

answers:

1

I want wxListCtrl in report mode and I want to lock one or more columns such that when you scroll left and 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?

A: 

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.

ravenspoint