Tk Source Code

Artifact [9471c89f]
Login

Artifact 9471c89fc038e8aeea9a9531cd124c5b12b56bfeb100ac70a9ade5562fc6b6a5:

Attachment "combobox-bug.tcl" to ticket [1600dc73] added by florian 2020-10-09 08:29:14. (unpublished)
ttk::button .button -text "1.) Open other app in 3 seconds." -command "after 3000 open_other"

ttk::combobox .combobox -values {value1 value2 value3}
.combobox set "2.) Open me before the other app opens"
grid .button   -row 0 -column 0 -padx 10 -pady 10 -sticky we
grid .combobox -row 1 -column 0 -padx 10 -pady 10 -sticky we
grid columnconfigure . 0 -weight 1

wm geometry . 400x300

proc open_other {} {
    set x [expr {[winfo rootx .] - 100}]
    set y [expr {[winfo rooty .] - 100}]
    exec [info nameofexecutable] -geometry 400x300+${x}+${y} -name "Other App" &
}