using combobox in tktable
- From: MAK <MichaelKlier@xxxxxxxxxxx>
- Date: 26 Apr 2007 05:17:47 -0700
Hi all,
I want to insert a combobox in a tktable. When I use the code behind
and the behaviour is the following:
- clicking once in a cell of the table, no combobox is shown. The
combobox is shown, when I move the scrollbar or click again in this
cell.
How can I be sure, that the combobox is shown the first time I press
the mouse-Button in a cell?
Is it possible to do the same Update as the scrollbar manually?
I'm using Version 2.9 of Tktable on a Windows PC.
here's the code I use:
package require Tktable
package require BWidget
# remove old combo-Box and show new one in current cell of table
proc ChangeComboBox {t pos} {
global table
puts "proc ChangeComboBox starts"
set cw $t.combo
# Combobox already exists (in old cell) ?
if {[winfo exists $cw]} {
# copy content of combobox in old cell
set content [$cw get]
$t window delete $table(current)
set table($table(current)) $content
}
# show combo-Box in new cell
set rc [$t index active]
ComboBox $cw -values "test asdf geheim test2 ypsilon" \
-expand tab \
-autocomplete true
$t window configure $rc -window $cw
focus $cw.e
#$t see active
#$t activate active
puts "proc ChangeComboBox ends"
}
set t .top
table $t \
-variable table \
-yscrollcommand { .sy set } \
-xscrollcommand { .sx set } \
-browsecommand {ChangeComboBox %W %S; set table(current) %S}
scrollbar .sy -command [list $t yview]
scrollbar .sx -command [list $t xview] -orient horizontal
pack .sx -side bottom -fill x
pack .sy -side right -fill y
pack $t -expand true -fill both
.
- Follow-Ups:
- Re: using combobox in tktable
- From: Jeff Hobbs
- Re: using combobox in tktable
- Prev by Date: Re: What can delay [comm send -async ...]?
- Next by Date: Re: posting a form data /automate IE
- Previous by thread: vwait doesn't return after setting TCL_SetVar from a thread
- Next by thread: Re: using combobox in tktable
- Index(es):