Re: [gtk-list] Re: gtk_list / gtk_clist selection mode combination



> From: Martin Kestel <mka@mppmu.mpg.de>
> Content-Type: TEXT/PLAIN; charset=US-ASCII
> Resent-From: gtk-list@redhat.com
> Reply-To: gtk-list@redhat.com
> X-Mailing-List: <gtk-list@redhat.com> archive/latest/3575
> X-Loop: gtk-list@redhat.com
> Precedence: list
> Resent-Sender: gtk-list-request@redhat.com
> X-URL: http://archive.redhat.com/gtk-list/
> Content-Length: 2555
> 
> 
> Thanks David,
> 
> 
> >
> >I have a GtkCList and use GTK_SELECTION_MULTIPLE and it works fine - I
> >haven't looked into a GtkList to know whether it's the same, but I
> >suspect it would be.
> >
> >Dave
> 
> I see I was not clear enough in my question:
> 
> I am using GTK_SELECTION_EXTENDED right now. Adventage is you may pull down
> with the mouse then.
> The drawback of this is, that once you have selected a bunch of items and want
> to select another bunch, but with a gap between, the first set gets
> deselected. 
> 
> What I would like to have is, to allow going along the list, selecting
> bunches at will and keeping all of them until some button callback says what
> to do with the selection.
> 
> This is sort of a meta combination of GTK_SELECTION_MULTIPLE with 
> GTK_SELECTION_EXTENDED: pulling down the mouse over tens of items is much more
> convenient than being forced to click click click click tons of items
> separately. Also convenient would be to allow deselection of single items,
> which have been selected wrongly without losing all the earlier selection
> work.
> 
> Will I have to set up sth like a routine watching the selection_changed,
> taking care for deselection == %2selection and colouring the selected items
> 'by hand', not at all using the built in features?
> 
>  Hope you can help me there?
> 
>  Bye,
> 
>    Martin
> 

I've done something similiar with GTK_SELECTION_MULTIPLE - I use
shift-click to select from the last selected row all the way to the
current row.  I call gtk_signal_emit_by_name with each row I want to
select to force a call to the callback for each row.  There may be a
better way to do this, but I didn't look into it once I got this to
work.


HTH,
Dave



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