Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Redraw of MenuItem in open toolbar
#3
Thank you for showing the workaround.
My toolbars are running in separate threads and I'm storing the created instances of each toolbar in a static dictionary and access them later by unique names.
If I try to update the button text by calling toolbar.DisplayText ^= true twice I receive an wrong thread exception as follows:
System.InvalidOperationException: Wrong thread.`n   at Au.Types.MTBase._ThreadTrap()
I am already using the option Triggers.Options.ThreadOfTriggers(); to create the toolbar triggers.
Is there any other chance (via windows message?) to invalidate and force redraw of that toolbar from other thread too?
Otherwise I might have to rewrite the business logic either by using the tag-property of toolbar to store the needed information within the same thread as the toolbar itself or by writing a wrapper class.


Messages In This Thread
RE: Redraw of MenuItem in open toolbar - by AutoStarter - 11-08-2024, 01:48 PM

Forum Jump:


Users browsing this thread: 4 Guest(s)