[Gambas-user] TreeView does not expand
Benoit Minisini
gambas at ...1...
Fri May 16 11:45:34 CEST 2008
On vendredi 16 mai 2008, Rolf-Werner Eilert wrote:
> 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
>
>
Note that if your item does not have any child, it will not expand.
--
Benoit Minisini
More information about the User
mailing list