D
Dave Mihalik
I would like to be able to change the icon of a window displayed using
Ruby and Tk.
Using Perl and Tk I can do the following:
use strict;
use warnings;
use Tk;
my $mymainwindow = MainWindow->new();
my $myicon = $mymainwindow->Photo(-file=>"myimage.gif");
$mymainwindow->iconimage($myicon);
MainLoop();
How would I go about doing this using Ruby and Tk?
I have tried the following:
require 'tk'
mymainwindow = TkRoot.new()
myicon = TkPhotoImage.new {file "myimage.gif"}
mymainwindow.iconimage(myicon)
Tk.mainloop()
I get the error unknown option "-iconimage" at runtime.
What is the correct way to set the icon image for a window using Ruby
and Tk?
Ruby and Tk.
Using Perl and Tk I can do the following:
use strict;
use warnings;
use Tk;
my $mymainwindow = MainWindow->new();
my $myicon = $mymainwindow->Photo(-file=>"myimage.gif");
$mymainwindow->iconimage($myicon);
MainLoop();
How would I go about doing this using Ruby and Tk?
I have tried the following:
require 'tk'
mymainwindow = TkRoot.new()
myicon = TkPhotoImage.new {file "myimage.gif"}
mymainwindow.iconimage(myicon)
Tk.mainloop()
I get the error unknown option "-iconimage" at runtime.
What is the correct way to set the icon image for a window using Ruby
and Tk?