08-03-2026 09:06 AM
Hi,
I have combo box which the user can click on. Once its clicked I'd like to dynamically refresh the strings the user can select. I attempted to solve this like below:
In this example the new strings come from a listbox, but the mechanism does not matter. The problem is that when the user clicks the dropdown arrow, it displays its current values and fires the event after that so no matter that I rewrite the strings[] in the CmbBox the old values are already on the screen and they not get updated. If I click away (menu closes) then click the arrow again then right values, but obviously I'd need the right values straight away.
What would be the right way to solve this without watching the input array and prewrite the values to the CmbBox if the input changes? (doable, but I'd like to avoid this as I have multiple comboboxes on the screen)
VI is attached for testing.
Solved! Go to Solution.
08-03-2026 09:23 AM
@1984 a écrit :
What would be the right way to solve this without watching the input array and prewrite the values to the CmbBox if the input changes? (doable, but I'd like to avoid this as I have multiple comboboxes on the screen)
Hi,
If you don't want to update all CmbBoxes for each input change, you will update a CmbBox every time the user interacts with it.
The simplest solution I can think of is to replace the "Operate Menu Activation" event with "Mouse Down?" event.
08-03-2026 09:32 AM - edited 08-03-2026 09:32 AM
Its solved, thanks!