Re: [gtk-list] CList focus



leon@udmnet.ru wrote:
> 
> Hi!
> 
> After filling up CList with items and setting focus to the first row I
> discover that there is 'secondary' focus on the item which I put in
> the list first. I don't want it. How to get rid of that secondary
> focus? (it looks like a thin rectangle around the item). It is desirable
> to have the two focuses to point at the same item. The list is in
> SELECTION_BROWSE mode. The wrong thing is that when you use cursor
> keys to browse, the main focus jumps to a place near where 'secondary'
> focus used to be.

You are confusing the current selection (blue) and the focus row
(outlined).  Here is a little function to set the focus row of a
GtkCList

void
gtk_clist_set_focus_row(GtkCList *list, guint row)
{
    g_return_if_fail(list != NULL);
    g_return_if_fail(row >= 0);
    g_return_if_fail(row < list->rows);

    list->focus_row = row;
}

-- 
René Seindal (rene@seindal.dk)			http://www.seindal.dk/rene/



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