PC Review


Reply
Thread Tools Rate Thread

adding controls to a statusBar

 
 
Tonya
Guest
Posts: n/a
 
      15th Dec 2003
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
 
Reply With Quote
 
 
 
 
Jan Tielens
Guest
Posts: n/a
 
      15th Dec 2003
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" <(E-Mail Removed)> schreef in bericht
news:037c01c3c333$a916fbb0$(E-Mail Removed)...
> 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



 
Reply With Quote
 
Tonya
Guest
Posts: n/a
 
      15th Dec 2003
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&rnum=5
>
>--
>Greetz,
>Jan
>__________________________________
>Read my weblog: http://weblogs.asp.net/jan
>"Tonya" <(E-Mail Removed)> schreef in

bericht
>news:037c01c3c333$a916fbb0$(E-Mail Removed)...
>> 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

>
>
>.
>

 
Reply With Quote
 
Jan Tielens
Guest
Posts: n/a
 
      16th Dec 2003
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" <(E-Mail Removed)> wrote in message
news:00cf01c3c33f$2f5dfab0$(E-Mail Removed)...
> 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&rnum=5
> >
> >--
> >Greetz,
> >Jan
> >__________________________________
> >Read my weblog: http://weblogs.asp.net/jan
> >"Tonya" <(E-Mail Removed)> schreef in

> bericht
> >news:037c01c3c333$a916fbb0$(E-Mail Removed)...
> >> 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

> >
> >
> >.
> >



 
Reply With Quote
 
Chris Dunaway
Guest
Posts: n/a
 
      19th Dec 2003
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.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Statusbar: Cannot switch off the statusbar via JavaScript. =?Utf-8?B?c2hha2xldG9u?= Windows XP Internet Explorer 1 30th Jun 2005 05:43 PM
adding controls from VBA nath Microsoft Access Form Coding 2 24th Mar 2004 04:41 AM
Adding controls via VBA nath Microsoft Access Form Coding 0 23rd Mar 2004 03:51 PM
Adding controls to Page.Controls collection Jeremy Ames Microsoft ASP .NET 5 5th Mar 2004 08:33 PM
Adding controls to Page.Controls collection Jeremy Ames Microsoft C# .NET 0 3rd Mar 2004 04:53 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:36 AM.