daniele391
Programmer
Hi,
I have to make a table whit every cell contain entry widget.
I saw from website and I find that example:
tixScrolledWindow .swin -scrollbar auto
set w [.swin subwidget window]
for {set x 0} {$x < 10} {incr x} {
pack [frame $w.f$x] -side left -fill y -expand yes
for {set y 0} {$y < 10} {incr y} {
pack [entry $w.f$x.e$y] -fill x -expand yes
}
}
The problem is that: I use tixGrid, and not tixScrolledWindows. I white that:
set grid [[tixScrolledGrid .sg -bd 0]subwidget grid]
$grid configure -formatcmd "SimpleFormat $grid"\
-height $row -width $column -background white
$grid set 0 0 -itemtype text -text "COLUMN 1"
$grid set 0 1 -itemtype text -text "COLUMN 2"
for {set i 1} {$i <= $row} {incr i} {
set valueList [lindex $list [expr $i-1]]
for {set j 1} {$j <= $column} {incr j} {
$grid set 0 $i -itemtype text -text [lindex $valueList 0]
$grid set 1 $i -itemtype text -text [lindex $valueList 1]
}
}
pack .sg
In this way, I see my table with correct value.
If I want to see entry widget into table's cells, instead of text? How I can do it?
Thanks and sorry for my English, but I'm italian.
Daniele
I have to make a table whit every cell contain entry widget.
I saw from website and I find that example:
tixScrolledWindow .swin -scrollbar auto
set w [.swin subwidget window]
for {set x 0} {$x < 10} {incr x} {
pack [frame $w.f$x] -side left -fill y -expand yes
for {set y 0} {$y < 10} {incr y} {
pack [entry $w.f$x.e$y] -fill x -expand yes
}
}
The problem is that: I use tixGrid, and not tixScrolledWindows. I white that:
set grid [[tixScrolledGrid .sg -bd 0]subwidget grid]
$grid configure -formatcmd "SimpleFormat $grid"\
-height $row -width $column -background white
$grid set 0 0 -itemtype text -text "COLUMN 1"
$grid set 0 1 -itemtype text -text "COLUMN 2"
for {set i 1} {$i <= $row} {incr i} {
set valueList [lindex $list [expr $i-1]]
for {set j 1} {$j <= $column} {incr j} {
$grid set 0 $i -itemtype text -text [lindex $valueList 0]
$grid set 1 $i -itemtype text -text [lindex $valueList 1]
}
}
pack .sg
In this way, I see my table with correct value.
If I want to see entry widget into table's cells, instead of text? How I can do it?
Thanks and sorry for my English, but I'm italian.
Daniele