Hello Ive been playing around with ruby Tk to build a UI for a few new
music ruby apps I was wondering if anyone knew how to get a image to
display for a button? Ive looked around but didn’t find any real world
examples
Thanks Gabriel
Hello Ive been playing around with ruby Tk to build a UI for a few new
music ruby apps I was wondering if anyone knew how to get a image to
display for a button? Ive looked around but didn’t find any real world
examples
Thanks Gabriel
From: GabrielG1976 [email protected]
Subject: Tk buttons with images ?
Date: Fri, 11 Dec 2009 08:40:08 +0900
Message-ID:
[email protected]
music ruby apps I was wondering if anyone knew how to get a image to
display for a button? Ive looked around but didn’t find any real world
See the Ruby/Tk WidgetDemo (ext/tk/sample/demos-en/widget on a Ruby
source). It includes examples of label widgets with a image.
TkButton class is a subclass of TkLabel.
So, same ways are available for button widgets.
Standard Tcl/Tk can support only GIF and PPM/PGM formats.
If you want to use other formats (BMP, JPEG, PNG, and so on),
you must use TkImg extention (ActiveTcl package includes TkImg
extension).
When “require ‘tkextlib/tkimg’” returns true,
your Ruby/Tk (Tcl/Tk) has TkImg extension.
Otherwise, you must install TkImg extension for your Tcl/Tk
libraries which used by Ruby/Tk.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs