Re: Too long menus

On Tue, Sep 07, 1999 at 03:16:35AM +0200, David Odin wrote:
>   Your code looks great! 


> But I still do not understand why people doesn't use a GtkComboBox
> instead of an option menu when the number of option is huge.
> GtkComboBox are rather easy to use and have an included scrollbar
> when needed.

Well, some existing apps already use GtkOptionMenu in places with lots
of options.  For instance, I often run up against the problem in the
Palette dialog of gimp.  Similarly when choosing a palette when
converting to indexed colors.  (Maybe these things have been fixed in
the 1.1.x versions.  I haven't tried them).

Second, when I started using OptionMenu it wasn't clear to me that I
could disable text entry on ComboBox and add custom list items to the
Combo's list widget.  So, for instance, I knew how to put little icons
next to some text using OptionMenu, but not with Combo.

Third, and the thing that really motivated me to do this patch, is
backward compatibility with other apps.  For instance, at my day job I
am writing a custom app for in-house use -- using GTK+.  Now, I am
already going a bit over the line by using GTK+ because the in-house
apps generally use our in-house widget set, and my app needs to deal
with "layers", which are a way my company structures a collection of
objects together in our custom data file format.  In some places,
there are as many as fifty layers together.  Traditionally users
always use an OptionMenu-like widget from the in-house widget set to
select a layer to be working in.  I feel it is best that I use an
OptionMenu widget to allow my users to select layers because it will
match all of their expectations, even though something else might be
better if my app existed in a vacuum.  I did consider using a GtkList
instead, but it would be too different and it took up too much screen
space.  I guess a Combo might work and not be too different.

Why not use the in-house widget set?  Because GTK+ is nicer, and
cleaner, and I needed a tree viewing widget, which the in-house set
doesn't have.  GtkCTree is wonderful.

So that is the long answer to why someone might want use one for a
long list.  :)

Matt Kimball

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