By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,312 Members | 1,214 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,312 IT Pros & Developers. It's quick & easy.

adding controls to a statusBar

P: n/a
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
Jul 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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/groups?q=st...phx.gbl&rnum=5

--
Greetz,
Jan
__________________________________
Read my weblog: http://weblogs.asp.net/jan
"Tonya" <an*******@discussions.microsoft.com> schreef in bericht
news:03****************************@phx.gbl...
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

Jul 21 '05 #2

P: n/a
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 textualinformation, you can also provide your own type of display to aStatusBarPanel. The Style property enables you to specify how theStatusBarPanel will be drawn. By default, the Style property is used todisplay the value of the Text property (and an icon if specified in the Iconproperty). If the property is set to StatusBarPanelStyle.OwnerDraw, you candraw your own information into the panel. You can use this feature to draw aprogress bar or an animated icon in the panel.

When you are adding the status bar, you are actually adding it to thecontainer of the StatusBarPanel, which is the StatusBar. Your best betwould be to draw the control yourself on the StatusBarPanel when theDrawItem event on the StatusBar is fired.

SOURCE:
http://groups.google.com/groups?q=statusbar+C% 23+button&hl=en&lr=&ie=UTF-8&oe=UTF-
8&selm=eWlc56x4CHA.1868%40TK2MSFTNGP12.phx.gbl&rnu m=5
--
Greetz,
Jan
__________________________________
Read my weblog: http://weblogs.asp.net/jan
"Tonya" <an*******@discussions.microsoft.com> schreef in berichtnews:03****************************@phx.gbl...
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

.

Jul 21 '05 #3

P: n/a
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
"Tonya" <an*******@discussions.microsoft.com> wrote in message
news:00****************************@phx.gbl...
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
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/groups?q=statusbar+C%

23+button&hl=en&lr=&ie=UTF-8&oe=UTF-
8&selm=eWlc56x4CHA.1868%40TK2MSFTNGP12.phx.gbl&rnu m=5

--
Greetz,
Jan
__________________________________
Read my weblog: http://weblogs.asp.net/jan
"Tonya" <an*******@discussions.microsoft.com> schreef in

bericht
news:03****************************@phx.gbl...
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

.

Jul 21 '05 #4

P: n/a
On Tue, 16 Dec 2003 08:01:05 +0100, Jan Tielens wrote:
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.
--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.
Jul 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.