Multiple questions on the treeview

I have create a window with a treeview to show some data to the user (read-only) and some other widgets to edit the selected item. See my website [1] for a screenshot.


Now I have a few problems/question:

1. Correctly updating the treeview model?

I connect to the 'changed' signal of the treeview selection, to make the other widgets show the contents of the selected row. For the comboboxes, I connect to the 'changed' signal to update the treeview model. But for the text entries, I connect to the 'focus_out_event' to update the model (and reformat the text entry itself).

This works great, except when the focus goes from a text entry to the treeview. In that case, the 'changed' event of the treeview is fired *before* the 'focus_out_event' of the text entry. This means the treeview model does not get updated correctly and the change is lost. How can I change that?

2. Width of the treeview columns?

How can I make the treeview columns use all the available horizontal space? I tried setting 'expand=true', but then the behaviour becomes very strange in combinatiion with 'resizable=true'. I think I need 'expand=true' only in some cases (e.g. initially and on resizing the window, but not on resizing an individual column). I that possible?

3. Height of the treeview?

How can I set the treeview height to show exactly 3 rows of data, whithout the need for a vertical scrollbar? I found a value by means of trial and error, but that will probably only work for my theme.

4. Height of the treeview header?

How can I find out the height of the treeview header? I would like to move the add, remove and clear buttons down a little bit, to make them align with the real contents of the treeview.

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