[Gambas-user] How do i use columnview.MoveBelow() ?

ron ronstk at ...239...
Sun Mar 28 16:28:00 CEST 2004


On Sunday 28 March 2004 11:21, Benoit Minisini wrote:
> On Sunday 28 March 2004 05:20, ron wrote:
> > I still can't get  it working
> >
> > in a list of 10 items the 4' is selected.
> > I want in code move to the item below with
> >
> > ColumnView1.MoveBelow()
> >
> > but nothing happens
> >
> > Pleas help
> >
> > Ron
>
> The Move*() methods move the INTERNAL cursor of the control.
>
> So, to select the item below:
>
> ColumnView1.MoveCurrent()
> ColumnView1.MoveBelow()
> ColumnView1.Item.Selected = TRUE
>
> Regards,

Arrrg, I got it partial now.
My example works now after add the the item.selected=true

But this is not as I expected, need or had in mind.

In msVB the treeview is in that way better then QT version 
or you did not implement if it can done.

The internal cursor is at a node/leaf, I must know the key of the 
parent. in VB you can you use pKey= TreeView1.Parent.key
Or if you are at the 3 level pKey=TV.Parent.Parent.Key
Here the Parent delivers the .TreeViewItem virtual class

In Gambas the .Current should refer to the selected and hightight
node and .Item reflect the node of the internal pointer.
It does that regarding the help browser.
With the move*() the internal pointer walks in the tree, also in the help

Then I expected after the Move*() the .Item reflects that node and I 
can read the key/text of it and not I must use the .Item.Selected

If this worked you can analize what is in the tree without disrupting 
the view the user had with the selected node.
You can show in a textbox the key/text of the child nodes

My point is, that I  must use the item.select to get the node data
I moved to, and the user cursor follows that.
 
Is there a way the .Item follows the internal pointer without the 
 .Selected is set ?

In VB the .Parent gives a tree part where the parent is like the root
.Children[1] does the same for that child i.e. .Children[1].Key.


I'm a bit sad now. :(

Ron













More information about the User mailing list