hi bong
hi others
i'm still using your proc for displaying many scale (a little bit modified).
i've just remove a part for the < 10 number (now, the only choice is x*10)
here's the proc
proc MakeSub {} {
#a frame for the scales
destroy $Dlightsub::local
pack [frame $Dlightsub::local -borderwidth 6 -bg black] -side top
set numRows [expr {$Dlightsub::nbr/10}]
pack [frame $Dlightsub::local.r] -side bottom
for {set r 0} {$r<$numRows} {incr r} {
pack [frame $Dlightsub::local.$r] -side top
for {set i 0} {$i<10} {incr i} {
pack [scale $Dlightsub::local.$r.$i -variable "sub $r$i" -from 100 -to 0 -length 150 -command [list scale_command "sub $r$i"]] -side left
bind $Dlightsub::local.$r.$i <ButtonPress-1><Motion> letsgo
}
}
}
now i would like to display a label for each scale with the "sub $r$i" as text.
i've tried with -label from scale command, but text is displayed at the top right corner. this take many space.... too much space.
i would like to insert the "sub $r$i" label just at the top of the corresponding scale.
can you help me to do that
many thanks
nico
hi others
i'm still using your proc for displaying many scale (a little bit modified).
i've just remove a part for the < 10 number (now, the only choice is x*10)
here's the proc
proc MakeSub {} {
#a frame for the scales
destroy $Dlightsub::local
pack [frame $Dlightsub::local -borderwidth 6 -bg black] -side top
set numRows [expr {$Dlightsub::nbr/10}]
pack [frame $Dlightsub::local.r] -side bottom
for {set r 0} {$r<$numRows} {incr r} {
pack [frame $Dlightsub::local.$r] -side top
for {set i 0} {$i<10} {incr i} {
pack [scale $Dlightsub::local.$r.$i -variable "sub $r$i" -from 100 -to 0 -length 150 -command [list scale_command "sub $r$i"]] -side left
bind $Dlightsub::local.$r.$i <ButtonPress-1><Motion> letsgo
}
}
}
now i would like to display a label for each scale with the "sub $r$i" as text.
i've tried with -label from scale command, but text is displayed at the top right corner. this take many space.... too much space.
i would like to insert the "sub $r$i" label just at the top of the corresponding scale.
can you help me to do that
many thanks
nico