RE: basic GTKCList data manipulation
- From: "Olivier Nenert" <onenert condumex com mx>
- To: "Najati R Imam" <nrimam0 pop uky edu>, <gtk-devel-list gnome org>
- Subject: RE: basic GTKCList data manipulation
- Date: Tue, 27 Jun 2000 17:15:30 -0600
Hi Najati..
for a)
you can get the row number with:
row=GPOINTER_TO_INT(GTK_CLIST(list)->selection->data);
(I had the same troubles and had to look at the sources to get this answer,
so it is not very
*comfortable* because it theoreticaly could change as not in the API doc.
(although I think it's in fact just because it was forgotten)
for b) maybe you could *mark* your row with a row_data and then look for it
*yuk* (you even have a function for that) (find_row_from_data .. something
like that)
I think you'll prefer a) :)
Cheers..
Olivier
-----Mensaje original-----
De: Najati R Imam <nrimam0@pop.uky.edu>
Para: gtk-devel-list@gnome.org <gtk-devel-list@gnome.org>
Fecha: Martes, 27 de Junio de 2000 15:54
Asunto: basic GTKCList data manipulation
>first off I guess I should mention I'm new to this list and fairly
primitive in
>my gtk experience, so I don't know whether I'm missing something obvious or
if
>this kind of question is asked more often then it should be, but I've been
>looking for and answer for serveral days and would like to move on.
>
>The general form of my question is, how do you know which row is selected?
The
>two most obvious answers would be a) You ask the list or b) You wait for
the
>list to tell you and remeber.
>
>My problem with answer a) is that I couldn't find a function that returned
what
>row I had selected and I couldn't get b) to work cause the function I had
to
>modify the struct I had to keep track of selected row would lose the change
>after exit, i.e. the scope was messed up and I can't figure out the
>pointers/references I need to keep the change.
>
>Ultimately, all I want to do is be able to insert before and after the
>selected row and deleted it (not and unreasonable request) so if someone
could
>send a few lines of code that created a list with a few random entries and
a
>button the removed the selected row, I think I could take it from their.
I've
>got a methods to try, but the seem really convoluted and I think I'd run
into
>the same problems I've been having with b). It shouldn't be too hard, I
>wouldn't think.
>
>Thanks,
> Najati
>
>_______________________________________________
>gtk-devel-list mailing list
>gtk-devel-list@gnome.org
>http://mail.gnome.org/mailman/listinfo/gtk-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]