[Gambas-user] TreeView does not expand
Rolf-Werner Eilert
eilert-sprachen at ...221...
Fri May 16 11:26:36 CEST 2008
Benoit Minisini schrieb:
> On jeudi 15 mai 2008, Rolf-Werner Eilert wrote:
>> This is on Gambas 2.6
>>
>> There is a TreeView, and I want the very first entry to expand. The rest
>> may stay collapsed. The TreeView is called "baum" ;-)
>>
>> So I start like
>>
>> bild = Picture["Icons/16x16/folder_green.png"]
>> baum.Add("CONTAINER", "Aktuelle Container", bild)
>> baum.Current.Expanded = TRUE
>>
>> but it doesn't expand.
>>
>> On Gambas 1 this worked as expected. Is this a bug or a feature?
>>
>> Thanks for your ideas.
>>
>> Rolf
>>
>
> Adding a treeview item does not make it "current" necessarily. But it should
> move the internal cursor to the newly added item, so you must do:
>
> baum.Add("CONTAINER", "Aktuelle Container", bild)
> baum.Item.Expanded = TRUE
>
> Another method:
>
> baum.Add("CONTAINER", "Aktuelle Container", bild).Expanded = True
>
> As Add() returns the newly created item (as specified in the documentation!)
>
> Regards,
>
Sorry, but this doesn't help either. Everything remains collapsed until
you double-click it or click its + sign.
Any other idea?
Rolf
More information about the User
mailing list