carlos - 30Sep04 - I must say that I really appreciate this program cause its something I've been looking for since I moved from Palm OS (I was using Progect) to iPAQ running Linux Familiar (kind of Debian ARM). I'd like to get some support getting the most of it on PDAs small display. I think its great program and very useful because its multi-platform and fits PDA.
What I miss most is the possibility of configurating visual appearance (Where can I find documentation of "standard Tk Options" mentioned in config file?).
- Icon buttons (New, Open, Save,..) are too big, possibility of resizing them to smaller version would be great.
- Since I'm using source code version is it possible to replace icon part of it?
- Also the side borders of an editing text area could be thinned.
I don't want to sound complaining-- I'm just using the opportunity to say what would PDA users really profit from. Thanks a lot!
- Icon button resizing - Requires some investigation. The images on the buttons are just gif data (see lib/tkoutline/tkIcons.klassic and http://www.satisoft.com/tcltk/icons/), so theoretically some smaller gifs should be able to be used. (Update: see below)
- Thinning of side borders - This should be doable via the preferences file and I'm not sure exactly how. I do know how to do it from the console. The command .f.nb configure -internalborderwidth 0 will eliminate most of the thickness and .f.nb configure -internalborderwidth 10 will restore it to how it is now. This change can be persisted via the startup script (Edit->Edit startup script):
proc ::tkoutline::afterInit {} { .f.nb configure -internalborderwidth 0 }
- Standard Tk options - Here's some information for standard options for the text widget: http://www.tcl.tk/man/tcl8.4/TkCmd/text.htm#M4. Not sure how much good that will do you.
- Replace icon part of it - I assume you mean get rid of it altogether. This is simple to do. From the console (hit <F2>), type the command pack forget .buttonbar and the icon bar will disappear. To persist this change so it happens automatically, just add the following code to your startup script (Edit->Edit startup script):
proc ::tkoutline::afterInit {} { pack forget .buttonbar }
If you add both of the above changes to your startup script, then it should look like the following:
proc ::tkoutline::afterInit {} { .f.nb configure -internalborderwidth 0 pack forget .buttonbar }
carlos - 4 Oct 2004 - Thanks for sharing this great tips. What I have originnly meant by replacing icons was to exchange them for say 10x10... Is there some simple howto to follow?
Brian Theado - no howto and here is some code that should help. The icon library I'm using comes with 22x22 and 16x16 icons. The code in tkoutline uses the 22x22. Here's some code that will switch to using the 16x16 (can be run from the console or placed in your afterInit function in your startup script:
foreach button winfo children .buttonbar { catch { set image string map {22 16} [$button cget -image] $button configure -image $image } }
If that isn't small enough for you, then here is some image resizing code:
# From http://wiki.tcl.tk/8448. Run in console or place in startup script proc scaleImage {im xfactor {yfactor 0}} { set mode -subsample if {abs($xfactor) < 1} { set xfactor expr round(1./$xfactor) } elseif {$xfactor>=0 && $yfactor>=0} { set mode -zoom } if {$yfactor == 0} {set yfactor $xfactor} set t image create photo $t copy $im $im blank $im copy $t -shrink $mode $xfactor $yfactor image delete $t }# Run this code from the console or place in ::tkoutline::afterInit in startup script foreach button winfo children .buttonbar { catch { set image $button cget -image scaleImage $image .5 ;# Replace .5 with whatever factor you want } }
See http://wiki.tcl.tk/ipaq for more information about tcl/tk and PDA's