Re: Display only X lines in GtkComboBox
- From: Todd Fisher <toddf simosoftware com>
- To: Paul Pogonyshev <pogonyshev gmx net>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Display only X lines in GtkComboBox
- Date: Mon, 25 Oct 2004 09:04:51 -0700
Eduardo,
I had a similar request awhile back and was faced with a similar
response; so, I set down
about 6 months ago to write my own combobox using a design that made
more sense to me for the particular application I had in mind. I've
made the source code available here:
http://severna.homeip.net/code.php#combobox
In defense of the scrollbars in a combobox; mine is implemented using a
searchable
GtkTreeView so people can use typeahead in the combobox.
I also, used a variation of the dropshadow patch from
http://www.xfce.org/gtkmenu-shadow/ which I think looks great :-). For
win32 I assume that this patch
http://bugzilla.gnome.org/show_bug.cgi?id=148535 has been applied for
the dropshadows to work.
The areas it could use some work are:
1. The sizing code needs some work right now I'm doing a little extra
padding to avoid
horizontal scrollbars up to what I would consider a reasonable
threshold.
2. I keep my win32 build environment following cvs so I have a lot of
ifdef GDK_WINDOWING_WIN32 use the latest gtk+ features which should be
replaced with macros to check for the gtk+ version rather then the
windowing type. I consider this minor since the main part of the code
supports 2.4 but it is something that would be nice to fix.
The features it supports:
1. It can be either editable or non-editable
2. typeahead
3. restricts the visable area to a sensable size
4. dropshadow effect
5. a GtkTreeModel interface for storing data
6. seperators
Hope this can help you :-)
-todd
Paul Pogonyshev wrote:
Eduardo M KALINOWSKI wrote:
I'm using a GtkComboBox to display some strings (stored in a
GtkListStore). The number of strings can become large, but I'd like the
box to display only a small number of them at a time (something like 5),
instead of showing "as many as fits the screen". Is it possible to do
that? I didn't find any function for that in the documentation.
This is a GTK+/GNOME policy. Since you popped down the combo box, you
probably want to see what you can select. Then why make things more
difficult (i.e. force you to scroll?)
I have seen a few particularly badly designed applications (non-GTK+)
where you had a combo box with hundreds of strings and only some 3 of
them visible at a time. Not particularly usable, eh?
Paul
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]