[[HomePage]] > [[SoftwareIndex|Software Index]] > [[SoftwareDevelopment|Development]] > [[gtkdialog|gtkdialog]] > [[gtkdialogDocTips|Tips and Tricks]] ====8. Text managing==== **INDEX** [[gtkdialogDocTips8/#hn_8.1| Some options for the widget]] [[gtkdialogDocTips8/#hn_8.2| Advanced text layout]] [[gtkdialogDocTips8/#hn_8.3| Scroll text]] [[gtkdialogDocTips8/#hn_8.4| Strikethrough text]] [[gtkdialogDocTips8/#hn_8.5| Set font]] [[gtkdialogDocTips8/#hn_8.6| Hyperlink]] ==8.1== **Some options for the widget** See [[https://github.com/puppylinux-woof-CE/gtkdialog/wiki/ reference guide]] for basic options. Here follows undocumented options. Justify aligment to right (1), center (2), left (3). ~#### Angle the text ~#### Force one-line text ~#### ~#### Set underline pattern ~#### ==8.2== **Advanced text layout** __underline__, ##italic## and **Bold**. ~#### Gtkdialog supports colors and size with the #### tag. The ##use-markup="true"## must be included. ~#### Text size is set by the #### and #### tags. Repeat (up to 3 times) to increase value. ~#### ~#### Vovchik has made an editor to test advanced text layout, Check it out at [[http://www.murga-linux.com/puppy/viewtopic.php?t=40418]]. ==8.3== **Scroll text** This example shows scrolling text in a #### widget. This will work for other widgets as well. %%(language-ref) export MSG="This is a test... I repeat: This is a test... " export GTKBOX=' MSG echo -en "${MSG:2}${MSG:0:2}" MSG ' gtkdialog -p GTKBOX %% ==8.4== **Strikethrough text** Strikethrough text is supported by the ##use-markup="true"## option for text widgets. ~#### This example shows strikethrough on request %%(language-ref) > /tmp/strikethrough export DIALOG=' EDIT write some text here 50 50 /tmp/strikethrough ' gtkdialog -p DIALOG %% ==8.5== **Set font** This is an example how to use other fonts even if gtkdialog hasn't an option to set this. Gtkdialog does not support monospace in the #### widget, but I can make it work by adding a unique gtk-theme only for my app. The best way to this is to add my new gtk-theme on top of the already existing. Now my gtk-theme can hold ONLY information about monospace, else it will use gtk-settings specified by user. By giving the text-widget a name (see example), it is possible to have a gtk-theme for only this unique text string. This also works for text in widgets like . %%(language-ref) echo 'style "specialmono" { font_name="Mono 12" } widget "*mono" style "specialmono" class "GtkText*" style "specialmono"' > /tmp/gtkrc_mono export GTK2_RC_FILES=/tmp/gtkrc_mono:/root/.gtkrc-2.0 export test_app=" All edit-widgets gets monospace. " gtkdialog --program=test_app %% ==8.6== **Hyperlink** Hyperlink is clickable text, often pointing user to a web page. %%(language-ref) linkstyle "click here" defaultbrowser '$LNK' %% Other solutions including #### is discussed at [[http://murga-linux.com/puppy/viewtopic.php?t=106458]] ===@@**#%[[gtkdialogDocTips7|❰❰❰ Previous]]#% #%[[gtkdialogDocTips|Index]]#% #%[[gtkdialogDocTips9.1|Next ❱❱❱]]#%**@@=== ---- ==Categories== CategoryGtkdialog