View previous topic :: View next topic |
Author |
Message |
keinfarbton
Joined: 03 Dec 2005 Posts: 224 Location: Stuttgart - Germany
|
Posted: Wed Mar 29, 2006 3:22 pm Post subject: TreeViewListener |
|
|
I have a TreeView showing a list with ListStore. The selection mode is SINGLE. With selection of an item, i want to update another TextView with a description. But it turns out, the rowActivatedCallback is called by pressing enter, space or double-click only.
Is there a way to get a notification for the single-click or arrow movement of the selection? |
|
Back to top |
|
|
Ant
Joined: 06 Mar 2004 Posts: 306 Location: Canada
|
Posted: Wed Mar 29, 2006 7:44 pm Post subject: Re: TreeViewListener |
|
|
tionex wrote: | I have a TreeView showing a list with ListStore. The selection mode is SINGLE. With selection of an item, i want to update another TextView with a description. But it turns out, the rowActivatedCallback is called by pressing enter, space or double-click only.
Is there a way to get a notification for the single-click or arrow movement of the selection? |
rowActivatedCallback is the only signal implemented on DUI for the TreeView (*).
(you could imlpement other signals for your own use).
I use lower level mouse actions on leds:
Code: |
bit mouseButtonReleaseCallback(Widget widget, EventButton eventButton)
{
TreeIter iter = getSelectedIter();
if ( iter !is null )
{
if ( eventButton.button() == 3 )
{
// do stuff
}
}
return true;
}
|
Duit already implements all signals, for instance:
Code: |
...
treeView.addOnMoveCursor(&moveCursorCallBack);
...
/+ return type will change to bool +/
int moveCursorCallBack(GtkMovementStep step, int direction, TreeView treeView)
{
// do stuff
return false;
}
|
Ant
(*) Duit implements all signals for all widgets as a list of delegates to be executed when each signal is raised - no listener interfaces tough.
(it's a bit soon to move to Duit yet) |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|