ruby-****@sourc*****
ruby-****@sourc*****
2012年 10月 28日 (日) 08:31:57 JST
------------------------- REMOTE_ADDR = 74.14.158.59 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-mnstbs-statb ------------------------- @@ -5,7 +5,7 @@ == Status Bar -Status bar is a widget used to provide information about the application status for the time its user interface is active and displayed to the user. It appears at the bottom of the application window. To start this chapter we will add status bar to our earlier rather simple programs from chapter 3, segment called '((<Tables|tut-gtk2-contwidg-tables>))', to demonstrate how to write a minimal status bar implementation. The program originally demonstrated the use of a Gtk::Table object, into which we placed two labels and an entry widget. The table was then added as the top widget to the main window. We wish to associate the entry object in the table with the status bar, and whenever user moves a cursor into the entry field display the message "Entering text" in the status bar, and removing this message if the user moves mouse cursor out of the entry field. +Status bar is a widget used to provide information about the application status for the time its user interface is active and displayed to the user. It appears at the bottom of the application window, though there is nothing preventing you to place it anywhere else on the screen. To start this chapter we will add status bar to our earlier rather simple programs from chapter 3, segment called '((<Tables|tut-gtk2-contwidg-tables>))', to demonstrate how to write a minimal status bar implementation. The program originally demonstrated the use of a Gtk::Table object, into which we placed two labels and an entry widget. The table was then added as the top widget to the main window. We wish to associate the entry object in the table with the status bar, and whenever user moves a cursor into the entry field display the message "Entering text" in the status bar, and removing this message if the user moves mouse cursor out of the entry field. To add a status bar widget we need to create a vertical box, and place the table with entry object and the labels above the newly created status bar in it. Finally we need to connect the Gtk::Widget's ((*'enter-notify-event'*))and((*'leave-notify-event'*))signal handlers to the entry object. Let's look at the example program: