hi all
i've got a script who create x scale (depends of demand)
i would like to display 10 scale per lines.
if i ask for 15 scale, i would like to display 10 and 5 under the 10
if i ask for 100, i would like to display 10 rang og 10 scale
here's my code
frame .0
pack .0 -side left -fill x
set f 0
set circ {}
frame .top -borderwidth 10
pack .top -side left -fill x
spinbox .top.circ -textvariable circ -from 0 -to 512 -increment 1 -width 5
bind .top.circ <Return> {focus .top}
canvas .top.z -width [expr $circ*100] -height [expr $circ*200]
button .top.go -text "go" -width 5 -height 3 -borderwidth 20 -command {
while {$f<$circ} {
scale .top.z.$f -orient vertical -from 100 -to 0 -length 150 -width 10 -variable sub$f -command [list scale_command sub$f]
pack .top.z.$f -side left
incr f
} }
proc scale_command {name value} {
pd_send "/$name $value;"
}
pack .top.circ .top.go .top.z
thank you for the help
nico
i've got a script who create x scale (depends of demand)
i would like to display 10 scale per lines.
if i ask for 15 scale, i would like to display 10 and 5 under the 10
if i ask for 100, i would like to display 10 rang og 10 scale
here's my code
frame .0
pack .0 -side left -fill x
set f 0
set circ {}
frame .top -borderwidth 10
pack .top -side left -fill x
spinbox .top.circ -textvariable circ -from 0 -to 512 -increment 1 -width 5
bind .top.circ <Return> {focus .top}
canvas .top.z -width [expr $circ*100] -height [expr $circ*200]
button .top.go -text "go" -width 5 -height 3 -borderwidth 20 -command {
while {$f<$circ} {
scale .top.z.$f -orient vertical -from 100 -to 0 -length 150 -width 10 -variable sub$f -command [list scale_command sub$f]
pack .top.z.$f -side left
incr f
} }
proc scale_command {name value} {
pd_send "/$name $value;"
}
pack .top.circ .top.go .top.z
thank you for the help
nico