2

I have a ToolStripLabel that needs to have its Text property updated from an event handler on a separate thread. Normally with a regular Label I've been using the InvokeRequired property and invoking a delegate to do the work if InvokeRequired returns true. The trouble is that ToolStripLabel doesn't have this property. What is the cleanest way to get this text updated in a thread-safe manner?

Joel B
  • 12,082
  • 10
  • 61
  • 69

1 Answers1

5

Use the InvokeRequired on the ToolStrip control instead of the ToolStripLabel.

Felice Pollano
  • 32,832
  • 9
  • 75
  • 115