Togglebutton with SVG images

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#16 Post by mavrothal »

zigbert wrote:You can not refresh the gtkdialog-code itself - this is already executed by gtkdialog. The way to do it is to
- define input: <input file>/tmp/button-icon.svg</input>
- if true: cp /usr/share/pixmaps/puppy/close.svg /tmp/button-icon.svg
- refresh button

Another solution is to hide/show 2 (toggle)buttons with different icons (and labels)
As I mentioned I could do the change with the input file as in don's examples, I was just trying to stick with your code and the buton_icon approach. I did not realise that is impossible this way (would be a nice feature to add if possible).
Thanks for saving me further time.
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#17 Post by don570 »

It is possible to have a togglebutton widget without the need for SVG images
(however svg images are quite powerful)

You can read about my experiences with the togglebutton widget.
Be careful with the bullet character!!

http://murga-linux.com/puppy/viewtopic.php?p=756690

___________________________________________________________

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#18 Post by technosaurus »

You can just set the image to auto-refresh and change the image to "toggle" it. ... Pretty simple compared to the methods in this thread
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

Post Reply