137. How to have Enter move to next field in form - Part 2?

Last Updated: 20 June 2015

Hits: 10914

Problem

This article achieves the same objective as Part 1, that is, using Enter to move to next field. Just want to show you that php-gtk2 gives a lot of flexibility and rooms for creativity that allow us to achieve the same thing in many different ways as shown below:

// display title
$title = new GtkLabel("Use Enter to Move to Next Field - Part 2\n"." using key-press-evnet on GtkWindow");$title->modify_font(new PangoFontDescription("Times New Roman Italic 10"));$title->modify_fg(Gtk::STATE_NORMAL, GdkColor::parse("#0000ff"));$title->set_size_request(-1, 40);$vbox->pack_start($title, 0, 0);