Revision history for gtkdialogDocTips9.9
Additions:
[[HomePage]] > [[SoftwareIndex|Software Index]] > [[SoftwareDevelopment|Development]] > [[gtkdialog|gtkdialog]] > [[gtkdialogDocTips|Tips and Tricks]]
===@@**#%[[gtkdialogDocTips9.8|❰❰❰ Previous]]#% #%[[gtkdialogDocTips|Index]]#% #%[[gtkdialogDocTips9.10|Next ❱❱❱]]#%**@@===
===@@**#%[[gtkdialogDocTips9.8|❰❰❰ Previous]]#% #%[[gtkdialogDocTips|Index]]#% #%[[gtkdialogDocTips9.10|Next ❱❱❱]]#%**@@===
Deletions:
@@**#%[[gtkdialogDocTips9.8|❰❰❰ Previous]]#% #%[[gtkdialogDocTips|Index]]#% #%[[gtkdialogDocTips9.10|Next ❱❱❱]]#%**@@
Additions:
====9.9 Set a fixed size of a progressbar====
Progressbars are by default rather big, and it's not that easy to redefine the width of them. To do this you have to combine some attributes.
%%(language-ref)
<hbox>
<vbox>
<progressbar width-request="100" height-request="20" Expand="no" Fill="no">
<input>echo 70; echo small bar</input>
</progressbar>
</vbox>
</hbox>
%%
@@**#%[[gtkdialogDocTips9.8|❰❰❰ Previous]]#% #%[[gtkdialogDocTips|Index]]#% #%[[gtkdialogDocTips9.10|Next ❱❱❱]]#%**@@
Progressbars are by default rather big, and it's not that easy to redefine the width of them. To do this you have to combine some attributes.
%%(language-ref)
<hbox>
<vbox>
<progressbar width-request="100" height-request="20" Expand="no" Fill="no">
<input>echo 70; echo small bar</input>
</progressbar>
</vbox>
</hbox>
%%
@@**#%[[gtkdialogDocTips9.8|❰❰❰ Previous]]#% #%[[gtkdialogDocTips|Index]]#% #%[[gtkdialogDocTips9.10|Next ❱❱❱]]#%**@@
Deletions:
Here follows 3 different ways of defining hotkeys
**<window>**
An ##<action>## signal inside the ##<window>## widget gives the most direct hotkey
##<action signal="key-press-event" condition="command_is_true( [ $(( ${KEY_MOD} & 5 )) = 5 ] && [ $KEY_RAW = 0x1b ] && echo true )">Refresh:varDATE</action>##
SHIFT's state is held by 0th bit and CTRL state by 2nd bit of ##$KEY_MOD## variable (?????C?S) , so, in order to read their state correctly, we need to discard the rest of bits by logical AND: ##$(( $KEY_MOD & 5 ))##. If we would want SHIFT alone, it would be ##$(( $KEY_MOD & 1)) = 1##, only CTRL - ##$(( $KEY_MOD & 4 )) = 4## and so on.
see [[http://murga-linux.com/puppy/viewtopic.php?t=94163]] for more depth.
**<menuitem>**
Menuitems can set both accelerator key and modifier (SHIFT is 1, CTRL is 4 and ALT is 8 ). For a full list of accelerator key values check [[http://git.gnome.org/browse/gtk+/plain/gdk/gdkkeysyms.h]]
##<menuitem stock-id="gtk-quit" accel-key="0x51" accel-mods="4">##
**<button>**
You can activate buttons by pressing keyboard combinations. simply add the attribute ##use-underline##. If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key.
##<button use-underline="true"><label>_Refresh</label></button>##
The defined char in the ##<label>## + 'alt' key will activate given ##<action>##.
@@**#%[[gtkdialogDocTips9.7|❰❰❰ Previous]]#% #%[[gtkdialogDocTips|Index]]#% #%[[gtkdialogDocTips9.9|Next ❱❱❱]]#%**@@