374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
|
proc BrowsePrintFileName {top entry} {
set prev $::eskil($top,printFile)
set dir [file dirname $prev]
set apa [tk_getSaveFile -initialdir $dir -initialfile [file tail $prev] \
-parent [winfo toplevel $entry] -title "PDF file"]
if {$apa ne ""} {
set ::eskil($top,printFile) $apa
$entry xview end
}
}
# Fix to give spinbox nicer appearance
proc MySpinBox {w args} {
# Handle if ttk::spinbox is not there since it was introduced later
if {[info commands ttk::spinbox] eq ""} {
set cmd [list tk::spinbox $w]
|
|
>
>
>
>
>
|
|
<
|
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
|
proc BrowsePrintFileName {top entry} {
set prev $::eskil($top,printFile)
set dir [file dirname $prev]
set apa [tk_getSaveFile -initialdir $dir -initialfile [file tail $prev] \
-parent [winfo toplevel $entry] -title "PDF file"]
if {$apa eq ""} return
# Auto-add .pdf
if {[file extension $apa] eq ""} {
append apa .pdf
}
set ::eskil($top,printFile) $apa
$entry xview end
}
# Fix to give spinbox nicer appearance
proc MySpinBox {w args} {
# Handle if ttk::spinbox is not there since it was introduced later
if {[info commands ttk::spinbox] eq ""} {
set cmd [list tk::spinbox $w]
|