-
Refresh Command Extension UI after change
Although I’ve written dozens of Vegas scripts, I’m now writing my first C# Vegas command extension DLL. My first problem is so very simple in nature, but so frustrating in my attempts to solve, I decided to go to the experts.
My User Control window contain a combobox that I want to fill with project tracks. So far so good. I’ve hooked into the Vegas TrackCountChanged event so I can update my combobox when tracks are added or removed from the timeline. But I’m having problems when something less significant happens; such as when the user renames a track.
When a track is renamed the only event that seems to get fired is the MediaPoolChanged event. So I’m doing a Refresh() method call on my combobox to update its UI to show the name change. The problem is, nothing is updated on the combobox window following the Refresh() call. However, if I click on another application, causing Vegas to loose focus, suddenly the combobox UI gets refreshed. This makes no sense whatsoever!
I’ve tried adding calls to the Vegas UpdateUI() method without success. And I’ve also had no luck adding an Application.DoEvents() method call following the Refresh(). Nothing I’ve tried causes the UI to be refreshed other than forcing Vegas to loose focus.
Any suggestions?
Thanks for any help you can offer.
Gary James’
Sorry, there were no replies found.