472,796 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,796 software developers and data experts.

adding controls to a statusBar

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
4 2296
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: Andrew Poulos | last post by:
If I manage to call the following bit of javascript in IE and MZ w = window.open("", "s", 'status=no,resizable=no,width=450,height=450'); I get a window that is not resizable and without a...
1
by: Ahmet | last post by:
In my application, I have statusbar on which i show icons. On some cases, I have to change icon of my statusbar to show different messages on panels. But I dont know how to change icon of one...
3
by: TonyM | last post by:
Hi all, I have an application with a few different Windows forms. I am trying to update a statusbar panel's text that is in the main form, from another form. When I set the statusbar and the...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
6
by: Anony | last post by:
Hi All, I have two icons: Private micoIcon1 As New System.Drawing.Icon(System.IO.Path.Combine(Application.StartupPath, "Icon1.ico")) Private micoIcon2 As New...
2
by: GrandpaB | last post by:
HI, I am attempting to write to the StatusBar on MyForm from within a class that I wrote. In the following code, VB does not like 'MyForm.StatusBar1.' VB states, ' Reference to a non-shared member...
4
by: Tonya | last post by:
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
5
by: Bill Nguyen | last post by:
I put 4 webbrower controls on a winform. I can set the initial position of the controls during design time. however, I need to be able to allow isers to resize the windows (maximize, for example)...
1
by: herve | last post by:
Hi, everybody I'm working with wxPython 2.8.1.1. Does anybody know how to change the foreground colors in a wx.StatusBar
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.