Accessing a toolstrip progressbar

B

barcrofter

Is there any way to get at a toolstrip progress bar by accessing
toolstrip.items() that contain the progressbar. Ive tried this and it
seems that there are only references to text or graphics. e.g. this
works:

StatusStrip.Items("publication").Text = "title stuff"
StatusStrip.Items("progress").Text = "Startup"

But If a progressbar called statusProgressBar is added to the
toolstrip via its editor I cant seem to get to these settings via
toolstrip.items, only directly by the name of the progressbar? e.g.
this creates an error:

StatusStrip.items("statusProgressBar").Minimum

while direct references like this work.

statusProgressBar.Minimum = 0
statusProgressBar.Maximum = 100

I really want to pass a single reference to toolstrip.items to a
class, rather than references to each component in it. Suggestions??
 
B

Bill McCarthy

Hi,

Try casting it to a ToolStripProgressBar

CType(StatusStrip1.Items("ToolStripProgressBar1"),
ToolStripProgressBar).Minimum = 0
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top