Re: [gtk-list] Re: gtk_list / gtk_clist selection mode combination
- From: Martin Kestel <mka mppmu mpg de>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: gtk_list / gtk_clist selection mode combination
- Date: Mon, 17 Apr 2000 10:09:20 +0200 (MET DST)
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 may cut some things:]
>> I want the user to be able to select items in a list in the form of the
>> following pattern:
>>
...but with a pulldown of the mouse.... (I did not say this before)
>> Listentries Selected(X)
>>
>> item
>> item X
>> item X
>> item X
>> item X
>> item
>> item X
>> item X
>> item X
>> item
>> item X
>> ...and so on.
>>
>> Right now its a GtkList, I will change it to a GtkCList in the future, but
>> that shouldn't matter, right?
>> I wonder whether I can combine the (GtkSelectionMode)MODE within the call to
>>
>> void gtk_list_set_selection_mode (GtkList *LIST, GtkSelectionMode MODE)
>>
>> (similar for a GtkCList)
>> in order to achieve this.
>>
>> From gtkenums.h:
>> /* list selection modes */
>> typedef enum
>> {
>> GTK_SELECTION_SINGLE,
>> GTK_SELECTION_BROWSE,
>> GTK_SELECTION_MULTIPLE,
>> GTK_SELECTION_EXTENDED
>> } GtkSelectionMode;
>>
>>
>> Bitwise OR / XOR / AND did not work. Earlier I tried subsequent calls with
>> GTK_SELECTION_MULTIPLE and thereafter GTK_SELECTION_EXTENDED.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]