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



   Hi,

I'm currently writing such a selection mechanism. It's for a widget 
derived from ctree, so easily adaptable for clist.

The selection mechanism is already functionnal and I think you could 
borrow and adapt some code if you want.

Tell me and I will point you to the CVS (our application is not quite 
usable yet, but you'll be able to test the selection mechanism to see 
if it fits).

Renaud

Martin Kestel wrote:

> Hmm. I think I will have to write some selection mechanism of my own achieving
> this behaviour ....sigh
> 
>    bye,
> 
>    Martin
> 
> On 17 Apr 2000, Owen Taylor wrote:
> 
> >
> >Martin Kestel <mka@mppmu.mpg.de> writes:
> >
> >> Hi All,
> >>
> >> I want the user to be able to select in a list in the form of the following
> >> pattern:
> >>
> >> 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.
> >
> >No, you can't combine them. This is a enumeration, not a set of flags.
> >
> >But, why would you want to? GTK_SELECTION_MULTIPLE and GTK_SELECTION_EXTENDED
> >both allow the user to do exactly the same thing - select 0 or more rows of
> >the CList - they just present different user interfaces for doing so.
> >
> >(The existance of both is mistake, BTW. The only result is going to be
> > confusion for the user.
> >
> > GTK_SELECTION_MULTIPLE should basically never be used. If the user needs
> > to be able to toggle rows of a list on and off easily, then there
> > should be a different interface that makes it clear to the user that
> > the behavior is different.
> >
> > For example, a column which is a check that the user can click on to
> > toggle. This is a bit hard, though not impossible, to implement currently
> > with the CList.)
> >
> >Regards,
> >                                        Owen
> >
> >
> >
> >--
> >To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
> >
> >
> 
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null



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