Immovable columns



Hi,

I have a situation where I want to display data in a tree view and have
the leftmost columns not scroll.

e.g. I have five columns abcde with only four columns visible (abcd)
pressing right on the horizontal scrollbar should scroll bcde, possibly
by an entire column at a time. Giving acde visible.

The rows are both affected by this and should scroll as normal.

I can think of three possible means to achieve this:

1) Two tree views side by side
One tree view contains the first column.
The second tree view contains all other columns
The horizontal scroll bar only affects the second view.
The vertical scrollbar affects both view.

I expect a single model should be fine for both views
Does this seem plausible? Can I do this with the vertical scrollbar?


2) Sub-class the TreeView
Add the ability to mark columns as fixed. The column must be either the
leftmost column or right of a fixed column.
Scroll left and right is then handled by re-ordering the columns.
e.g. start with columns abcde with column a fixed
press scroll right, columns are re-ordered to acdeb
This would also achieve scrolling by a whole column at a time.

This is probably the most work but might be useful to others.


3) Use GtkTable widgets instead
Construct 2 GtkTable widget one for the fixed columns and one for the
scrollable columns. This also requires implementing the headers
separately as they don't scroll vertically but will scroll horizontally
for the second table.

This gives me complete control over construction but requires me to
implement things I give more cheaply with a tree control. i.e. multiple
views, searching, sorting, etc.


Whichever option I choose I have a fair bit of work ahead. I'm early
enough into the project that I can choose the least painfully route I
hope.

Any suggestions?

James

	
-- 
James Durie               Phone:  +44 20 7749 7904
Anvil Software Limited    Fax:    +44 20 7749 7916
46-48 Rivington Street    e-mail: jdurie anvil co uk
London EC2A 3QP




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]