The function should be returning None if you click outside of the cells,
or (row,col) if you click on a cell.  I don't know why it would be acting
differently on your system.

The code in pygtk reads like this:
  if (gtk_clist_get_selection_info(GTK_CLIST(PyGtk_Get(clist)), x, y,
                                   &row, &column))
    return Py_BuildValue("(ii)", row, column);
  else {
    Py_INCREF(Py_None);
    return Py_None;
  }

This is a pretty close match to the documented behaviour of the function:
  http://developer.gnome.org/doc/API/gtk/gtkclist.html#GTK-CLIST-GET-SELECTION-INFO

James.

--
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/


On Mon, 14 Feb 2000, Martin Preishuber wrote:

> Hi,
> 
> just playing with drag and drop to CLists and CTrees and there's some
> strange thing. I've done something like:
> 
> list.connect("drag_data_received", DragReceiveList)
> 
> def DragReceiveList(clist, context, x, y, data, info, time):
>     selection = clist.get_selection_info(x, y)
> 
> so this should return row,col of the current selection. The bad
> thing is, that it returns (0,x) for the title of the clist,
> (1,x) for the first element of the clist and None for the last
> element, which is wrong IMHO.
> 
> any ideas ?
> 
> Martin
> 
> -- 
> Martin Preishuber - Student, ECLiPt Core Member, SysAdmin
> http://eclipt.uni-klu.ac.at,
> mailto:[EMAIL PROTECTED]
> 
> The luck that is ordained for you will be coveted by others.
> To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
> 

To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]

Reply via email to