Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Redraw of MenuItem in open toolbar
#1
I have an C# program and use the latest nuget package of LibreAutomate 1.5.0 to automate windows using toolbar triggers.
I have several submenus with radiobuttons in toolbars and want to update the choosen item text in the parent toolbar button (toolbarItem.Text = "Update") while the toolbar stays open.

I found in code the following Update function in decompiled toolbar code which should take care of redraw:
   private void _Invalidate(TBItem ti = null) {
    _ThreadTrap();
    if (IsOpen) {
      if (ti != null) {
        Api.InvalidateRect(_w, ti.rect);
      }
      else {
        Api.InvalidateRect(_w);
      }
    }
Unfortunately the redraw happens only if I move the mouse over the button.
What shall I do to redraw the changed button without mouseover?
Has it something to do with threading?


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

Forum Jump:


Users browsing this thread: 2 Guest(s)