Re: GtkClist signals and double click



On Sun, 6 Aug 2000, Salvador Ramirez wrote:

> Vlad Harchev wrote:
> [deleted]
> > > I couldn't find documentation on what information contain
> > > selection->data. The GTK+
> > > manual does not cover this. Where can I find information on this? I mean
> > > on how
> > > to get the index (or data itself) of the selected row of a gtk_clist
> > > double click?
> > 
> >  See in GTK FAQ how to detect double clicks.
> 
> As I already said, in the GTK+'s faq is only a very simple example
> explaining
> how to catch the double click but never how to retrieve the information
> of 
> the row double clicked.  I still can't figure out how to do that.

  Use the gtk_clist_get_selection_info - pass it the coordinates of the
button-press-event and it will return the row and column number.
 
> >  As for selections - I already told you what the value of clist->selection
> > means for several selection modes. As for others - just do a small guesswork
> > (coupled with a testsuite) and you'll discover what it means.
> 
> Sorry, I am quite newbie on GTK+. Could you please give an example with
> some
> code? 
 
  What exactly it should demonstrate? Have you seen examples supplied with gtk
source code?
  As for selections - do you really need the selection modes
(GTK_SELECTION_MULTIPLI E or GTK_SELECTION_EXTENDED) for which I failed to
describe the meaning of 'selection->data'?

> > > I tried to write a callback for the select_row and unselect_row signal
> > > where I
> > > keep the selected row index on a variable but the problems arises when I
> > > have
> > > already selected a row on the gtk_clist and then do the double click on
> > > the same
> > > row because with the first click I unselect the already selected row.
> > 
> >  Don't use this approach.
> 
> Yes, I knew that, but I have to solve this problem someway..
> 
> Thanks a lot for you patience,
> 
> ---sram
> 

 Best regards,
  -Vlad





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]