Revision history for gtkdialogDocTips9.6


Revision [33336]

Last edited on 2023-02-24 06:56:11 by zigbert
Additions:
[[HomePage]] > [[SoftwareIndex|Software Index]] > [[SoftwareDevelopment|Development]] > [[gtkdialog|gtkdialog]] > [[gtkdialogDocTips|Tips and Tricks]]
===@@**#%[[gtkdialogDocTips9.5|❰❰❰ Previous]]#% #%[[gtkdialogDocTips|Index]]#% #%[[gtkdialogDocTips9.7|Next ❱❱❱]]#%**@@===
Deletions:
[[HomePage]] > [[SoftwareIndex Software Index]] > [[SoftwareDevelopment Development]] > [[gtkdialog gtkdialog]] > [[gtkdialogDocTips Tips and Tricks]]
@@**#%[[gtkdialogDocTips9.5|❰❰❰ Previous]]#% #%[[gtkdialogDocTips|Index]]#% #%[[gtkdialogDocTips9.7|Next ❱❱❱]]#%**@@


Revision [32945]

Edited on 2020-08-02 11:54:59 by zigbert
Additions:
====9.6 Refresh image====
Gtkdialog can refresh an image in a ##<pixmap>## widget without restarting the gui. Since the ##<input file>## is static, we must change its content (by copy another file), and then refresh.
%%(language-ref)
export MAIN='
<window>
<pixmap>
<variable>IMAGE</variable>
<input file>/root/image1.png</input>
</pixmap>
<button>
<label>Change image</label>
<action>cp -f /root/image2.png /root/image1.png</action>
<action type="refresh">IMAGE</action>
</button>
</window>'
gtkdialog --center --program=MAIN
%%
@@**#%[[gtkdialogDocTips9.5|❰❰❰ Previous]]#% #%[[gtkdialogDocTips|Index]]#% #%[[gtkdialogDocTips9.7|Next ❱❱❱]]#%**@@
Deletions:
====9.5 Window header icon====
You can add your own icon (symlinks also work) if you place it in a gtk-theme directory structure as ##/usr/share/icons/hicolor/##. ie. ##/usr/share/icons/hicolor/48x48/apps/games48.png##
Now, run this command in the terminal to refresh the icon cache;
~##gtk-update-icon-cache -f -i /usr/share/icons/hicolor##
Your gtkdialog code would look like this;
~##<window title="A GTKDialog" icon-name="games48" resizable="false" decorated="true">##
@@**#%[[gtkdialogDocTips9.4|❰❰❰ Previous]]#% #%[[gtkdialogDocTips|Index]]#% #%[[gtkdialogDocTips9.6|Next ❱❱❱]]#%**@@


Revision [32944]

The oldest known version of this page was created on 2020-08-02 11:52:50 by zigbert
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki