473,405 Members | 2,210 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 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 2345
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.