progress bar on a status bar
Create a status bar. Let's call it "StatusBar".
Add a Panel. Let's call it "ProgressPanel".
Create a progress bar. Let's call it "StatusProgressBar".
Create the DrawItem event for the status bar and put in the
following code:
private void StatusBar_DrawItem( object sender,
StatusBarDrawItemEventArgs sbdevent )
{
if( sbdevent.Panel = this.ProgressPanel )
{
this.StatusProgressBar.Bounds = sbdevent.Bounds;
}
Quote:
}
Works like a charm for me.
-c
Quote:
> What is the best way to keep the overlayed progress bar associated to
a
> specific status bar panel while resizing the form and the progress bar
is
> displayed?
> Basil
> > You don't actually place the progress bar ON the status bar, you
place
> > it OVER the status bar:
> > // Determine point to position.
> > progressBar1.Location = new Point( ...);
> > progressBar1.Height = statusBar1.Height - 4;
> > Controls.Add( progressBar1 );
> > progressBar1.BringToFront();
> > progressBar1.Show();
> > // Use
> > // Or just hide and reuse later.
> > progressBar1.Dispose();
> > Chris R.
> > > how do i place a progress bar on a status bar panel?
> > > thanks,
> > > Rob