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

Re: GtkEntry history?



> 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)

Iain - iain@webtribe.net



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