Drag and Drop (again)
- From: Derek Wueppelmann <monkey monkey homeip net>
- To: gtk-perl-list gnome org
- Subject: Drag and Drop (again)
- Date: 16 Apr 2002 15:49:34 -0400
I know I asked this earlier, and I did get an answer, but it was a
little awkward to implement. So here it is posed yet again.
I'm trying to get drag and drop working between a CList and a Tree. I
want to grab items from the CList and drop them to a individual item in
the Tree. For every tree item I am supplying the following code upon
creation of the item.
$newItem = new_with_label Gtk::TreeItem($nodeName);
$subTree->append($newItem);
$newItem->signal_connect('select', \&treeItemSelected);
$newItem->signal_connect('button_press_event', \&treeButtonPressed);
$newItem->drag_dest_set('all', ['copy', 'move'],
{target=>'STRING', flags=>0, info=>0});
$newItem->signal_connect('drag_data_received', \&recieveDragData);
$newItem->set_user_data($nodeData);
$newItem->show();
However the only item I can drop items onto is the root item. this is
most perplexing to me since I should be able to drop to any individual
item, or so it would seem I should be able to. Am I missing somethign or
is the only way I'm going to get this to work is to grab the location of
the drop from the viewport and map that to the tree item?
--
o) Derek Wueppelmann (o
(D . monkey monkey homeip net D).
((` http://monkey.homeip.net/ ( ) `
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]