Re: [gtk-list] ctree right-click question
- From: Todd Dukes <tdukes ibmoto com>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] ctree right-click question
- Date: Thu, 05 Aug 1999 10:55:15 -0500
gandalf@pobox.com wrote:
>
> I'm using the ctree widget, and would like to make use of the right mouse
> button. What I want to do is select a row and have a popup window come
> up. Now getting the popup menu to appear when I right click is easy, the
> problem I am having is in selecting the ctree row. Is there anyway to
> determine which row the mouse is "over"?
>
> Thanks
> -chris
>
> _______________________________________________________
> Christopher Rogers http://www.pobox.com/~gandalf
> gandalf@pobox.com gandalf@darkcorner.net
>
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
Here is a small section of c++ code (using gtk--) that gets
the row_data from the item the mouse is over. Hopefully you
can figure out how to convert this to C. I you can't, let me
know and I'll try to convert it.
This function is the one I call on the button press.
Hope this helps,
Todd.
void
TreeView::createTreeMenu ( GdkEventButton * event )
{
// get the item under the mouse
RowDataType * row_data = 0;
gint row;
gint column;
if ( ctree -> get_selection_info ( event -> x, event -> y, &row,
&column ) )
{
row_data = static_cast < RowDataType * >
( ctree -> node_get_row_data ( ctree -> get_node ( row ) ) );
}
...
}
--
| Todd Dukes E-MAIL: tdukes@ibmoto.com |
| Motorola Somerset Phone: (512) 424-8008 |
| 6200 Bridgepoint Parkway Building #4 MS OE70 |
| Austin, Texas 78730 |
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]