On 8/3/2023 1:26 PM, Alexandru wrote:
How can I bind a function to the click on combobox arrow button?
I want to create the listvariable dynamically, when the user wants to show the dropdown list.
Many thanks
Alexandru
I think you want the -postcommand option. That will call the given function on the left click of the popdown arrow, and it can both set the current value as well as the popdown list values. For example, this will set 3 values and also set 1 as the
current value:
ttk::combobox .cb -postcommand cbpost -textvariable mytext
pack .cb
proc cbpost {} {.cb config -values {1 2 3};set ::mytext 1}
The values you set need not be a constant as in this example.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)