enthought / enthought/traitsui

Question: Fixing last column width of TreeEditor

Open
#1,801 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
306
Forks
99
PR merge metrics
No merged PRs in 30d

Description

Hey,

i have a question on the TreeEditor when using AbstractTreeNodeRenderers:
How can i fix the width of the last column in a tree editor to the needed minimum (like 50 pixels),
so that the edit view of the tree node item scales to maximum width?

My problem can be seen in the Tree_editor_with_TreeNodeRenderer.py example, when setting the SparklineTreeView editable
and increasing the size of the view to w1500, h800.

Although the SparklineRenderer returns a size hint with a width of 100, the column width is way more.
![image](https://user-images.githubusercontent.com/48917891/152109951-4a867111-277b-4afe-896b-9f90f81f5854.png)

In my application this look very weird, because of so much white space:
![image](https://user-images.githubusercontent.com/48917891/152110206-8dbecb5d-a6a5-4484-8ee7-63293895629f.png)

Hope you can give me a hint.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.