Re: [gnome-db] DBGrid



En jue, 2001-11-29 a 10:37, Rodrigo Moya escribio:
> On Thu, 2001-11-29 at 00:00, Juan Andrés Bentancour wrote:
> > Hello !
> > 
> > How can I set a DbGrid widget to only let single row's selection ??
> > I tried with:
> >   gtk_clist_set_selection_mode ( GTK_CLIST(GNOME_DB_GRID
> > (dbgrid1)->grid),
> >                                   GTK_SELECTION_SINGLE );
> > 
> this won't work, since GnomeDbGrid is not a GtkCList. It does contain
> one, but it's not a CList.
> 
> Anyway, you can't do that, but it's so easy that I'll add a
> 
> gnome_db_grid_set_selection_mode
> 
> function this evening. Or if you want to do it yourself, and send a
> patch, that would be great. You just have to edit gnome-db-grid.c and
> add that function which should just call gtk_clist_set_selection_mode on
> the GnomeDbGrid's internal GtkCList.
> 
> If there's no patch from you this evening, I'll add it myself :-)
> 

here is the patch for gnome-db-grid .

bye !

616a617
> 
617a619,633
>  *  gnome_db_grid_set_selection_mode
>  *  @grid: the grid widget
>  *  
>  *  Set the  selection mode in the given grid
>  */
> void
> gnome_db_grid_set_selection_mode (GnomeDbGrid *grid,GtkSelectionMode  mode)
> {
>         g_return_if_fail(GNOME_DB_IS_GRID(grid));
>         gtk_clist_set_selection_mode(GTK_CLIST(grid->grid),mode);
> }
> 
> 
> 
> /*






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