Reputation: 13130
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?
Upvotes: 2
Views: 1110
Reputation: 33252
Use the InvokeRequired
on the ToolStrip control instead of the ToolStripLabel.
Upvotes: 5