Hidetoshi NAGAI wrote: > From: Marcin Simonides <marcin / studio4plus.com> [...] >> In documentation that I found: >> http://www.jbrowse.com/text/rubytk_en.html#label:18 >> there is a definition: >> >> TkToplevel.new(parent=nil, keys=nil) >> TkToplevel.new(parent=nil, screen=nil, classname=nil, keys=nil) >> >> but calling TkToplevel.new(@parent, nil, 'MyClass') doesn't set the >> window's class. > > I'm very sorry. That is a bug. The 'classname' argument doesn't work. > Instead of that argument, please use one of the followings: > > (1) t = TkToplevel.new(parent, :class=>'MyClass') > or > t = TkToplevel.new(parent, :classname=>'MyClass') Thanks. This works. > (2) class MyClass < TkToplevel; end; t = MyClass.new(@parent) > > If you want to use the widget name on the resource DB, > please use 'widgetname' option. [...] I only need to identify application's windows in WM so that I can apply specific styles and functions to them. But I'll keep this part about DB options in mind. -- Marcin Simonides -- Posted via http://www.ruby-forum.com/.