From: Hidetoshi NAGAI Date: 2009-02-14T08:41:32+09:00 Subject: Re: Ruby GUI Survey: Results From: Mark Roseman Subject: Re: Ruby GUI Survey: Results Date: Wed, 11 Feb 2009 08:23:52 +0900 Message-ID: > Because of that, if you ask for a button using the same Ruby/Tk code as > you were using before, you still get the old button, whereas you have to > use a different call to get the themed variant ... it amounts to > replacing 'TkButton.new' with 'Tk::Tile::Button.new'. So if you don't > know to update the code (and how are people supposed to find that out), > your GUI still looks pretty shitty. Additional Information. :-) A sample script "/ext/tk/sample/ttk_wrapper.rb" can make old Ruby/Tk scripts to use Ttk widgets as default. For example, "ttk_wrapper.rb -l" lists current supported theme names on your environment. (With no option, shows a usage.) "ttk_wrapper.rb -t keramik /ext/tk/sample/demo-en/widget" executes "Ruby/Tk Widget Demo" with "keramik" theme. When "Tk.default_widget_set = :Ttk", TkButton and so on denote Ttk (Tile) widgets. And when "Tk.default_widget_set = :Tk" (default), TkButton and so on denote starndard Tk widgets (Tk::Button and so on). Of course, Tk widgets and Ttk widgets have different options. Some utility methods (those are used in ttk_wrapper.rb) hide imcompatible errors. Those may be dangerous. Please use them at your own risk. ;-) -- Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)