ruby-****@sourc*****
ruby-****@sourc*****
2005年 3月 7日 (月) 21:38:28 JST
------------------------- REMOTE_ADDR = 202.96.19.49 REMOTE_HOST = REMOTE_USER = ruby-gnome2-hiki URL = http://ruby-gnome2.sourceforge.jp/cgi-bin/hiki/hiki.cgi?Gtk%3A%3AFileChooserButton ------------------------- TITLE = Gtk::FileChooserButton KEYWORD = = class Gtk::FileChooserButton The Gtk::FileChooserButton is a widget that lets the user select a file. It includes the Gtk::FileChooser module. Visually, it is a file name with a button to bring up a Gtk::FileChooserDialog. The user can then use that dialog to change the file associated with that button. This widget does not support setting the "select-multiple" property to true. === Example 5. Create a button to let the user select a file in /etc button = Gtk::FileChooserButton.new("Select a file", Gtk::FileChooser::ACTION_OPEN) button.current_folder = "/etc" The Gtk::FileChooserButton supports the ((<GtkFileChooserAction|Gtk::FileChooser#GtkFileChooserAction>))s Gtk::FileChooser::ACTION_OPEN and Gtk::FileChooser::ACTION_SELECT_FOLDER. :Important The Gtk::FileChooserButton will ellipsize the label, and thus will thus request little horizontal space. To give the button more space, you should call Gtk::Widget#size_request, Gtk::FileChooserButton#width_chars=, or pack the button in such a way that other interface elements give space to the widget. == Object Hierarchy * Object * GLib::Instantiatable * GLib::Object * Gtk::Object * Gtk::Widget * Gtk::Container * Gtk::Box * Gtk::HBox * Gtk::FileChooserButton == Included Modules * Gtk::FileChooser == Class Methods --- Gtk::FileChooserButton.new(title, action, backend = nil) Creates a new file-selecting button widget. ((* Since 2.6 *)) * title: the title of the browse dialog. * action: the open mode for the widget. ((<GtkFileChooserAction|Gtk::FileChooser#GtkFileChooserAction>)) * backend: The name of the specific filesystem backend to use or nil. (e.g.) "gnome-vfs" * Returns: a new Gtk::FileChooserButton widget. --- Gtk::FileChooserButton.new(dialog) Creates a Gtk::FileChooserButton widget which uses dialog as it's file-picking window. Note that dialog must be a Gtk::FileChooserDialog (or subclass). ((* Since 2.6 *)) * dialog: the Gtk::FileChooserDialog widget to use. * Returns: a new Gtk::FileChooserButton widget. --- title Retrieves the title of the browse dialog used by button. ((* Since 2.6 *)) * Returns: The title of the file chooser dialog. --- title=(title) Modifies the title of the browse dialog used by button. ((* Since 2.6 *)) * title: the new browse dialog title. * Returns: title --- set_title(title) Same as title=. ((* Since 2.6 *)) * title: the new browse dialog title. * Returns: self --- width_chars Retrieves the width in characters of the button widget's entry and/or label. ((* Since 2.6 *)) * Returns: an Integer width (in characters) that the button will use to size itself. --- width_chars=(n_chars) Sets the width (in characters) that button will use to n_chars. ((* Since 2.6 *)) * n_chars: the new width, in characters. * Returns: n_chars --- set_width_chars(n_chars) Same as width_chars=. ((* Since 2.6 *)) * n_chars: the new width, in characters. * Returns: self --- dialog=(dialog) Sets the Gtk::FileChooserDialog to use. ((* Since 2.6 *)) * dialog: The Gtk::FileChooserDialog to use. * Returns: dialog --- set_dialog(dialog) Same as dialog=. ((* Since 2.6 *)) * dialog: The Gtk::FileChooserDialog to use. * Returns: self == Properties --- dialog: Gtk::FileChooserDialog (Write) The file chooser dialog to use. ((* Since 2.6 *)) --- title: String (Read/Write) The title of the file chooser dialog. ((* Since 2.6 *)) --- width-chars: Integer (Read/Write) The desired width of the button widget, in characters. ((* Since 2.6 *)) == See Also Gtk::FileChooserDialog == ChangeLog * 2005-03-07 Added - ((<Masao>))