Re: Adaptive Comboboxes



Óscar Fuentes wrote:
jschmeiser@xxxxxxx writes:

A combobox in a GUI displays values from a list. That list is updated
by user actions but I can't get the combobox to update to show the new
values that have been appended or changed in the list. Optimally, the
combobox selections should change everytime there is a change to the
list.

Which combobox? (Tile, BWidget, ...)

I would put a trace on the variable that holds the list, and there
update the combobox by assigning the -values option.

Just to expand a little: the combobox (at least Tile/ttk) takes a (copy of a) list, not a variable name. The widget has no way of knowing that the original list changed, since its copy does not change.

Depending on how you change the original master list, either use the trace recommended above, or just do the configure whenever you change the list. The latter would probably be easier if the list is changed in just one place.


Gerry
.



Relevant Pages

  • Re: Adaptive Comboboxes
    ... A combobox in a GUI displays values from a list. ... by user actions but I can't get the combobox to update to show the new ... shows dynamic list updates. ...
    (comp.lang.tcl)
  • Adaptive Comboboxes
    ... A combobox in a GUI displays values from a list. ... by user actions but I can't get the combobox to update to show the new ... Deep down I know that the answer is simple but I haven't been able to ...
    (comp.lang.tcl)
  • Re: Adaptive Comboboxes
    ... by user actions but I can't get the combobox to update to show the new ... update the combobox by assigning the -values option. ...
    (comp.lang.tcl)
  • Re: datetimepicker question
    ... using the control. ... either a ComboBox or TextBox for inputting the year value? ... ' Set first day of month ... depending on what you want your user to see. ...
    (microsoft.public.vb.controls)
  • Re: prevent the user to open the list of the combo-box
    ... depending on the value of the main form ... control, so the combobox is simply inaccessible in the circumstances you ... Liat wrote: ...
    (microsoft.public.access.forms)