Re: traverse through a clist from my user interface



On Saturday 20 December 2003 21:36, Thomas Keaney wrote:
Hi,

Im using a clist in order to display text for my user interface. However, I
dont want to have to click on the clist with the mouse or use the keyboard
in order to go up and down the list. I have two buttons in my interface
that I want to carry out this operation instead. These two buttons will go
up  the list once or down the list once depending on which button has been
pressed. How would I do carry out this operation? Thanks in advance.

The row that is selected is stored in clist->selection. If 
(clist->selection == -1) that means no row is selected. 
clist->selection = 1 should select first row and so forth. 

Also, you could use functions, 
void gtk_clist_select_row(GtkClist *clist, gint row, gint column);
void gtk_clist_unselect_row(GtkClist *clist, gint row, gint column);
void gtk_clist_unselect_all(GtkClist *clist);

hth (otherwise the gurus on this list would come up with something I am sure)

Regards

-- 
Sukrit K Mehra
Email Id: holysmoke amaltaas biz
Website: http://www.symonds.net/~holysmoke





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