adding controls to a statusBar

  • Thread starter Thread starter Tonya
  • Start date Start date
T

Tonya

Hi,

Does anyone know how i can add controls to a progress bar.
I have searched the internet but could not find any
examples.

what i want to add is a progress bar and a button.
thx
 
This seems to be possible:

From the documentation for the StatusBarPanel:
Although the StatusBar control is typically used to display textual
information, you can also provide your own type of display to a
StatusBarPanel. The Style property enables you to specify how the
StatusBarPanel will be drawn. By default, the Style property is used to
display the value of the Text property (and an icon if specified in the Icon
property). If the property is set to StatusBarPanelStyle.OwnerDraw, you can
draw your own information into the panel. You can use this feature to draw a
progress bar or an animated icon in the panel.

When you are adding the status bar, you are actually adding it to the
container of the StatusBarPanel, which is the StatusBar. Your best bet
would be to draw the control yourself on the StatusBarPanel when the
DrawItem event on the StatusBar is fired.

SOURCE:
http://groups.google.com/[email protected]&rnum=5
 
Hi Jan,

I found a document that gives a brief outline as to the
procedure to use to carry out this task. However it does
not give me any guidence on how to go about coding it.
can anyone help me on this.

this is what the document said.....
"You cannot place controls into a StatusBar control in the
designer. However, you can add any no. of Controls to the
StatusBar programatically through it's Controls property.
After adding the Controls, set their Visible, Location and
Bounds property appropriately. "

source:
http://www.syncfusion.com/faq/winforms/search/894.asp

thx

-----Original Message-----
This seems to be possible:

From the documentation for the StatusBarPanel:
Although the StatusBar control is typically used to display textual
information, you can also provide your own type of display to a
StatusBarPanel. The Style property enables you to specify how the
StatusBarPanel will be drawn. By default, the Style property is used to
display the value of the Text property (and an icon if specified in the Icon
property). If the property is set to
StatusBarPanelStyle.OwnerDraw, you can
 
That would be something like this:

Dim tb As New Textbox
tb.Text = "Testing"
Statusbar1.Controls.Add(tb)
tb.Visible=True

--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan
 
That would be something like this:

Dim tb As New Textbox
tb.Text = "Testing"
Statusbar1.Controls.Add(tb)
tb.Visible=True

Be sure to set the location property of the TextBox. The location is set
relative to the upper left corner of the StatusBar.
 
Back
Top