RE: CList
- From: "Dmitry Ponomaryov" <eagleowl comail ru>
- To: Álvaro Vieira <gtk-app-devel-list gnome org>
- Subject: RE: CList
- Date: Fri, 27 Jul 2001 20:54:14 +0400
How I get a clist selected row? (single selection)
Connect to the signal "select_row" and use signal handler:
void
select_cb( GtkWidget *widget,
gint row,
gint column,
GdkEventButton *event,
gpointer data )
{
// ...
GtkCListRow* clist_row;
clist_row = ROW_ELEMENT (clist, row)->data;
// ...
}
Where macro ROW_ELEMENT is defined in the gtkclist.c
[pay attention to use of g_list_nth]:
/* returns the GList item for the nth row */
#define ROW_ELEMENT(clist, row) (((row) == (clist)->rows - 1) ? \
(clist)->row_list_end : \
g_list_nth ((clist)->row_list, (row)))
---
Dmitry Ponomaryov
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]