Home All Groups Group Topic Archive Search About

Binding a StatusBar Panel Text property - Solution?!

Author
17 Feb 2006 11:03 AM
Matt
I've found that the StatusBar Panel object does not have a DataBindings
property which doesn't help if you want to do such a thing.

Searching the web and these news groups didn't present me with an
answer so I thought I'd post what I came up with to help others.

Add another control to your form that does have a DataBindings & Text
property, I used a Label.
Bind that contol to what ever you wish to display.
In the TextChanged event for the control that is now bound, set the
Text property of the StausBar Panel to whatever the control has just
changed to.
Make the extra control invisible.

Hope it helps,

Matt

Author
17 Feb 2006 11:23 AM
Matt
Ooops, I've just found that making the extra control (Label) invisible
prevents the TextChanged event from firing.

I'll have to hide it somewhere :)

AddThis Social Bookmark Button