Re: need entry widget to dynamically resize to fit contents
- From: george young <gry ll mit edu>
- To: Valdis Kletnieks vt edu
- Cc: gtk-list gnome org
- Subject: Re: need entry widget to dynamically resize to fit contents
- Date: Thu, 6 Feb 2003 17:49:05 -0500
On Thu, 06 Feb 2003 16:21:29 -0500
Valdis Kletnieks vt edu wrote:
> On Thu, 06 Feb 2003 13:15:32 EST, george young <gry ll mit edu> said:
> > [gtk-2.2.0, pango-1.2.0, pygtk-1.99.14, python-2.3a1, linux]
> > I need a gtk2 entry widget to expand (and hopefully contract too)
> > so as to always display just the text it contains. It is critical
> > that all the text be visible, not scroll out of sight. I'm using a
> > monospace font. Is there some neat way to do this?
>
> What's the desired behavior if the text goes out-of-range in size? For
> instance, if you're using a 8x10 monospace font, the window is 400x200,
> and the display is 800x600, what should happen if your text exceeds 50x20
> or 100x60 chars in size? And if you have something like:
>
> || label |input area| || (where || is a window edge)
>
> what should happen to the label if 'input area' grows enough to push it off
> the screen?
The window should simply expand as far as necessary. The application's main window
is inside a scrolled window, so the user can manually scroll if need be --
(and this is important): manually scroll to see part of the window the scroll bars
tell her are obscured. A *fixed* width gtk_Entry does not provide any visual cue
when some data is obscured.
In practice, the awkwardness of dealing with a data window much wider than
the screen will sharply curtail user's verbosity, so I don't worry too much
about people writing War&Peace in a gtk.Entry. The application provides
other places to enter long multi-line verbiage.
-- George
--
I cannot think why the whole bed of the ocean is
not one solid mass of oysters, so prolific they seem. Ah,
I am wandering! Strange how the brain controls the brain!
-- Sherlock Holmes in "The Dying Detective"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]