+2003-04-08 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * tkcon.tcl (::tkcon::InitUI): WinCE code to resize the window to
+ fit on the small screen
+
2003-03-31 Jeff Hobbs <jeffh@ActiveState.com>
* tkcon.tcl (tkcon::Retrieve): correct the check for tkcon version
}
set OPT(font) [$con cget -font]
if {!$PRIV(WWW)} {
+ if {[string match "Windows CE" $::tcl_platform(os)]} {
+ $con configure -bd 0
+ catch {font create tkconfixed}
+ font configure tkconfixed -family Courier -size 8
+ set cw [font measure tkconfixed "0"]
+ set ch [font metrics tkconfixed -linespace]
+ set sw [winfo screenwidth $con]
+ set sh [winfo screenheight $con]
+ # We need the magic hard offsets until I find a way to
+ # correctly assume size
+ if {$cw*($OPT(cols)+2) > $sw} {
+ set OPT(cols) [expr {($sw / $cw) - 2}]
+ }
+ if {$ch*($OPT(rows)+3) > $sh} {
+ set OPT(rows) [expr {($sh / $ch) - 3}]
+ }
+ # Place it so that the titlebar underlaps the CE titlebar
+ wm geometry $root +0+0
+ }
$con configure -setgrid 1 -width $OPT(cols) -height $OPT(rows)
}
bindtags $con [list $con TkConsole TkConsolePost $root all]