Accessing a toolstrip progressbar

  • Thread starter Thread starter barcrofter
  • Start date Start date
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??
 
Hi,

Try casting it to a ToolStripProgressBar

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