ruby-****@sourc*****
ruby-****@sourc*****
2009年 1月 26日 (月) 03:19:08 JST
------------------------- REMOTE_ADDR = 74.15.84.244 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-dialog-fichoo ------------------------- @@ -99,7 +99,7 @@ {{image_right("dialog-fichoo-03.png")}} {{br}} -The dialogue in the following listing will handle the creation of a new folder in the current folder entered into the name field and confirmed by the user, so you do not have to take any further actions except destroying the dialogue. Note, however, that there exists already a built in button (2) solely for folder (directory) creation, and that the way it is done in this program may be confusing to the user. The two fields namely the name field where a user is expected to enter a new folder name (1) and the field that opens when he or she clicks the button "Create Folder" (2) are internally related. Not that it is important, but this is not immediately apparent and takes some testing to realize that created folder shows up in the name field if you back up to the folder in which the new one was created. This exercise was useful only to show you the use of file chooser's action flag Gtk::FileChooser::ACTION_CREATE_FOLDER. You have to test run this program to understand what was just said! +The dialogue in the following listing will handle the creation of a new folder in the current folder entered into the name field and confirmed by the user, so you do not have to take any further actions except destroying the dialogue. Note, however, that there exists already a built in button (2) solely for folder (directory) creation, and that the way it is done in this program may be confusing to the user. The two fields namely the name field where a user is expected to enter a new folder name (1) and the field that opens when he or she clicks the button "Create Folder" (2) are internally related. Not that it is important, but this is not immediately apparent and takes some testing to realize that created folder shows up in the name field if you back up to the folder in which the new one was created. This exercise is useful only to show you the use of file chooser's action flag Gtk::FileChooser::ACTION_CREATE_FOLDER. You have to test run this program to understand what was just said! #!/usr/bin/env ruby require 'gtk2'