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

Re: GtkEntry history?





On Thu, 5 Aug 1999, Iain wrote:

> > I want to allow the user to cycle between previous things they typed in an
> > entry using with the up/down arrows, similar to bash's command history. My
> > problem is that an up or down arrow keypress will switch the focus from
> > the entry to another. Is there a way to prevent this?
> 
> Connect a signal to key-press-event, and in the callback check if the key
> was an up or down and then change the entry and return FALSE, or if it's not
> return TRUE to propagate the signal.
> 
> Check out Mini-Commander applet if you want to see some code that does it.
> (I have some on the linux partition, but I'm in windows at the moment - as
> an aside, does anyone know a way of mounting ext2fs partitions from
> windows95, I'd heard it was possible, but that it was tricky and windows
> didn't like it much. Mail me privately so we don't fill the list with evil
> windows information)

Thanks for reminding me of mini-commander! It's exactly the code I want.
I'll take a look at the code and try to put the history list into my
application.

Is there anything GNOME-specific in the relevant parts?

> Iain - iain@webtribe.net
> 
> 
> -- 
>          To unsubscribe: mail gtk-app-devel-list-request@redhat.com with 
>                        "unsubscribe" as the Subject.
> 
> 	Mailing list concerns should be mailed to <listmaster@redhat.com>
> 
> 



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