From: Keith on


In this script I successfully create a ScrolledWindow & ScrolledFrame,
but I would like to make them bigger by having more vertical lines
displayed. Currently it only shows about ten vertical lines of the thirty
lines of data in the window.

TIA.

proc 21 {} {
[snip]

frame $gx.b1 -bg white
pack $gx.b1 -fill both -expand true -anchor center -side top
label $gx.b1.l0 -bg white -foreground black -font $fn(2) -text

[snip]

for {set e 0} {$e <= 4} {incr e 1} {
grid $gx.b1.l$e -row 0 -column $e
}
# Make a frame scrollable
set gr [ScrolledWindow $gx.sw -auto both -relief sunken -borderwidth 2]
#grid $gr -sticky news
pack $gr -fill x -expand true -anchor center


set sf [ScrollableFrame $gx.sf -bg white]

$gr setwidget $sf

set gl [$sf getframe]

# Now fill the frame, resize the window to see the scrollbars in action


frame $gl.p -bd 2 -bg white
pack $gl.p -fill x -expand true -anchor center -side top

set rw 1
for {set gg 0} {$gg <= 30} {incr gg 1} {
if {$gg == "0"} {\
set ee 1
foreach e {Frequency PL Name {Step kHz} Mode} {
label $gl.p.$ee -text $e -fg $fg(1) -font $fn(1) -bg gray95 -fg
blue -relief raised -anchor w -justify left
grid $gl.p.$ee -row 0 -column [expr $ee - 1] -sticky w
incr ee 1
}
} else {\

entry $gl.p.a$gg -textvariable fq($gg) -bg white -width 10
-font $fn(2)
entry $gl.p.b$gg -textvariable pl($gg) -bg white -width 5
-font $fn(2)
entry $gl.p.c$gg -textvariable cname($gg) -bg white -width 16
-font $fn(2)
tk_optionMenu $gl.p.d$gg stp($gg) AUTO 5.00 6.25 7.50 10.00 12.50
15.00 20.00 25.00 50.00 100.00
tk_optionMenu $gl.p.e$gg mod($gg) AUTO FM NFM AM
checkbutton $gl.p.f$gg -variable att($gg) -text Att -onvalue 1
-offvalue 0 -bg white
checkbutton $gl.p.g$gg -variable tlock($gg) -text ToneL/O -onvalue 1
-offvalue 0 -bg white
checkbutton $gl.p.h$gg -variable lout($gg) -text L/O -onvalue 1
-offvalue 0 -bg white
checkbutton $gl.p.i$gg -variable pri($gg) -text PRI -onvalue 1
-offvalue 0 -bg white
checkbutton $gl.p.j$gg -variable alt($gg) -text Alert -onvalue 1
-offvalue 0 -bg white
$gl.p.d$gg config -width 6 -bg gray95 -font $fn(1)
$gl.p.e$gg config -width 6 -bg gray95 -font $fn(1)
set co 0
foreach e {a b c d e f g h i j} {
grid $gl.p.$e$gg -row $rw -column $co -sticky news
incr co 1
}
incr rw 1
}
}

frame $gx.buttons -bg aliceblue -relief sunken -bd 5 -pady 10
pack $gx.buttons -fill x -expand true -anchor w -side top -pady 10

button $gx.buttons.up -text "Check Data"

[snip]

grid $gx.buttons.r2 -row 0 -column 4 -sticky w -padx 5

frame $gx.o -bg indianred -bd 1
pack $gx.o -fill x -expand true -anchor w -side bottom
label $gx.o.1 -bg gray -relief raised -width 130
pack $gx.o.1

focus $gx.b1.l1
return
}

--
Best Regards, Keith
http://home.comcast.net/~kilowattradio/
I'm Your Huckle Berry
http://www.youtube.com/watch?v=KfbAFgD2mLo
From: Harald Oehlmann on
On 13 Mai, 16:32, Keith <kilowattra...(a)use-reply-to.invalid> wrote:
>  In this script I successfully create a ScrolledWindow & ScrolledFrame,
> but I would like to make them bigger by having more vertical lines
> displayed. Currently it only shows about ten vertical lines of the thirty
> lines of data in the window.

Hello Keith,
unfortunately, your example does not run as it is. To investigate,
please provide a running example.
My comments:
- be shure to use BWidget 1.9.0, there are quite a couple of bugs
fixted since 1.8.
- the code seams ok for me.
- What happens if you resize your toplevel to hold more than 10
lines ?

Hope this helps,
Harald