Hello.<br><br>I want to use PNG-Images on Ltk-Buttons. Therefore, I want to use the Img-Package. I am not familiar with this. I read the documentation and tried the following:<br><br><br><br>(setf *init-wish-hook* (append<br>
*init-wish-hook*<br> (list (lambda ()<br> (send-wish "package require Img")))))<br><br>(defun config-button-png (button png)<br> (format-wish "~A configure -image [ image create photo -data \"~A\" ]"<br>
(ltk::name button)<br> png))<br><br>(with-ltk ()<br> (let* ((f (make-instance 'frame))<br> (b (make-instance 'button<br> :master f<br> :text ""<br>
:command (lambda () (format t "Quak!~%")))))<br> <br> (pack f)<br> (config-button-png b "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAIAAAACUFjqAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9kEARQbItOgpzAAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAEklEQVQY02P8z4APMDGMSmMBAEEsARNlYhAzAAAAAElFTkSuQmCC")<br>
(pack b)))<br><br><br>This doesnt work. Also when replacing -data by -file and providing a filename, it doesnt work. I also tried to replace ltk::name by ltk::widget-path.<br>There is no Image appearing. In the wish-shell, the following works:<br>
<br>package require Img<br>set frame .frame<br>toplevel $frame<br>frame $frame.f<br>button $frame.f.b -text ""<br>$frame.f.b configure -image [ image create photo -data "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAIAAAACUFjqAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9kEARQbItOgpzAAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAEklEQVQY02P8z4APMDGMSmMBAEEsARNlYhAzAAAAAElFTkSuQmCC" ]<br>
<br>Do you have any clue what I am doing wrong?<br><br>Thank You.<br>Christoph Senjak<br>