Re: Has anyone been able to force TreeView expander with no children?



Hi Daniel,

On Mi, 14.10.2009 18:52, Daniel B. Thurman wrote:

>I need
>the expanders so that when I expand the directory
>in question, I would then trigger a call to add more
>children, and so on.

The way I do that is to add a single dummy child (with a text like
"Loading..."). That makes the top level entry expandable. When
the user expands the item, he gets feedback right away by seeing the
"Loading..." entry, while the code populates the model on the fly, and
finally removes the dummy entry.

Others (e.g. Nautilus list view) seem to do it similarly.

Holger


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