Thanks, Gary. I left out the height because that was working for me. The full suite of properties is:
Statusbar.width
Statusbar.height
Statusbar.size
Statusbar.size.width
Statusbar.size.height
You can either set the height and width separately, or set the "size" which is a structure which you have to build using System.Drawing.Size.
But, I've figured out my problem, as you'll see in my next post. Basically, you can only make the size smaller than the size you made it on the panel, not bigger.
Reiner
_____
From: Voltz, Gary [mailto:gary.voltz@AirservicesAustralia.com]
Sent: Monday, January 07, 2008 4:51 PM
To: Schlieker, Reiner; VRF
Subject: RE: [vrf] Runtime size of .NET control
Firstly My guess is that
Statusbar.width or
Statusbar.size or
Statusbar.size.width
Should be
Statusbar.width or
Statusbar.height or
Statusbar.size
Secondly are you setting the height and width and then setting the Statusbar to visible. Because after the size parameters are changed you’ll need to redraw the object to see the change.
Cheers,
Gary
Gary Voltz
SASTO4
Test Equipment and Maintenance and Calibration Centre
Facilities Management Services
Technology and Asset Services
Airservices Australia
E-mail: gary.voltz@airservicesaustralia.com
_____
Airservices Australia
Ph 1300 301 120 (within Australia)
Ph +61 7 3866 3382 (outside Australia)
Fax +61 7 3866 3531
HYPERLINK "http://www.airservicesaustralia.com/"www.airservicesaustralia.com
CAUTION: This e-mail is confidential. If you are not the intended
recipient, you must not disclose or use the information contained
in it. If you have received this e-mail in error, please tell us
immediately by return e-mail and delete the document.
Airservices Australia does not represent, warrant or guarantee
that the integrity of this communication is free of errors, virus
or interference.
_____
From: Schlieker, Reiner [mailto:reiner.schlieker@siemens.com]
Sent: Tuesday, 8 January 2008 7:21 AM
To: VRF
Subject: [vrf] Runtime size of .NET control
Hello all,
I can't figure out how to control the size of a Statusbar control properly at runtime. I can set the height of the control, but the width remains unchanged (when I read it back and visually) whether I set it using
Statusbar.width or
Statusbar.size or
Statusbar.size.width
MSDN has this statement in the documentation:
Because the Size class is a value type (Structure in Visual Basic, struct in Visual C#), it is returned by value, meaning accessing the property returns a copy of the size of the control. So, adjusting the HYPERLINK "http://msdn2.microsoft.com/en-us/library/betxbs3a(VS.80).aspx"Width or HYPERLINK "http://msdn2.microsoft.com/en-us/library/tk7tftxw(VS.80).aspx"Height properties of the Size returned from this property will not affect the HYPERLINK "http://msdn2.microsoft.com/en-us/library/bk74axfh(VS.80).aspx"Width or HYPERLINK "http://msdn2.microsoft.com/en-us/library/k9w3e9xh(VS.80).aspx"Height of the control. To adjust the Width or Height of the control, you must set the control's Width or Height property, or set the Size property with a new Size.
Which is clear as mud to me (isn't that what I'm doing?). Can anybody shed some light on this?
BTW, I have the same issue with the RichTextBox, though it actually returns the height and width as set, but the box hasn't changed it's size visually.
Thanks,
Best regards
Reiner Schlieker
Test Equipment Designer
Siemens AG
Automation and Drives, Siemens Milltronics Process Instruments Inc.
Tel. : +1 (705) 740-7553
Fax : +1 (705) 740-7692
mailto:reiner.schlieker@siemens.com
http://www.siemens.com/automationhttp://www.siemens.com/automation
Siemens Aktiengesellschaft: Chairman of the Supervisory Board: Gerhard Cromme;
Managing Board: Peter Loescher, Chairman, President and Chief Executive Officer;
Heinrich Hiesinger, Joe Kaeser, Rudi Lamprecht, Eduardo Montes, Juergen Radomski,
Erich R. Reinhardt, Hermann Requardt, Uriel J. Sharef, Peter Y. Solmssen, Klaus Wucherer;
Registered offices: Berlin and Munich;
Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB 6684;
WEEE-Reg.-No. DE 23691322
---
You are currently subscribed to vrf as: gary.voltz@airservicesaustralia.com
To subscribe please send an email to: "vrf-request@lists.it.agilent.com" with the word subscribe in the message body.
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".
Search the "unofficial vrf archive" at "http://www.vrfarchive.com/vrf_archive".
Search the Agilent vrf archive at "http://vee.engineering.agilent.com".
---
You are currently subscribed to vrf as: ming_meng@agilent.com
To subscribe please send an email to: "vrf-request@lists.it.agilent.com" with the word subscribe in the message body.
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".
Search the "unofficial vrf archive" at "http://www.vrfarchive.com/vrf_archive".
Search the Agilent vrf archive at "http://vee.engineering.agilent.com".
Statusbar.width
Statusbar.height
Statusbar.size
Statusbar.size.width
Statusbar.size.height
You can either set the height and width separately, or set the "size" which is a structure which you have to build using System.Drawing.Size.
But, I've figured out my problem, as you'll see in my next post. Basically, you can only make the size smaller than the size you made it on the panel, not bigger.
Reiner
_____
From: Voltz, Gary [mailto:gary.voltz@AirservicesAustralia.com]
Sent: Monday, January 07, 2008 4:51 PM
To: Schlieker, Reiner; VRF
Subject: RE: [vrf] Runtime size of .NET control
Firstly My guess is that
Statusbar.width or
Statusbar.size or
Statusbar.size.width
Should be
Statusbar.width or
Statusbar.height or
Statusbar.size
Secondly are you setting the height and width and then setting the Statusbar to visible. Because after the size parameters are changed you’ll need to redraw the object to see the change.
Cheers,
Gary
Gary Voltz
SASTO4
Test Equipment and Maintenance and Calibration Centre
Facilities Management Services
Technology and Asset Services
Airservices Australia
E-mail: gary.voltz@airservicesaustralia.com
_____
Airservices Australia
Ph 1300 301 120 (within Australia)
Ph +61 7 3866 3382 (outside Australia)
Fax +61 7 3866 3531
HYPERLINK "http://www.airservicesaustralia.com/"www.airservicesaustralia.com
CAUTION: This e-mail is confidential. If you are not the intended
recipient, you must not disclose or use the information contained
in it. If you have received this e-mail in error, please tell us
immediately by return e-mail and delete the document.
Airservices Australia does not represent, warrant or guarantee
that the integrity of this communication is free of errors, virus
or interference.
_____
From: Schlieker, Reiner [mailto:reiner.schlieker@siemens.com]
Sent: Tuesday, 8 January 2008 7:21 AM
To: VRF
Subject: [vrf] Runtime size of .NET control
Hello all,
I can't figure out how to control the size of a Statusbar control properly at runtime. I can set the height of the control, but the width remains unchanged (when I read it back and visually) whether I set it using
Statusbar.width or
Statusbar.size or
Statusbar.size.width
MSDN has this statement in the documentation:
Because the Size class is a value type (Structure in Visual Basic, struct in Visual C#), it is returned by value, meaning accessing the property returns a copy of the size of the control. So, adjusting the HYPERLINK "http://msdn2.microsoft.com/en-us/library/betxbs3a(VS.80).aspx"Width or HYPERLINK "http://msdn2.microsoft.com/en-us/library/tk7tftxw(VS.80).aspx"Height properties of the Size returned from this property will not affect the HYPERLINK "http://msdn2.microsoft.com/en-us/library/bk74axfh(VS.80).aspx"Width or HYPERLINK "http://msdn2.microsoft.com/en-us/library/k9w3e9xh(VS.80).aspx"Height of the control. To adjust the Width or Height of the control, you must set the control's Width or Height property, or set the Size property with a new Size.
Which is clear as mud to me (isn't that what I'm doing?). Can anybody shed some light on this?
BTW, I have the same issue with the RichTextBox, though it actually returns the height and width as set, but the box hasn't changed it's size visually.
Thanks,
Best regards
Reiner Schlieker
Test Equipment Designer
Siemens AG
Automation and Drives, Siemens Milltronics Process Instruments Inc.
Tel. : +1 (705) 740-7553
Fax : +1 (705) 740-7692
mailto:reiner.schlieker@siemens.com
http://www.siemens.com/automationhttp://www.siemens.com/automation
Siemens Aktiengesellschaft: Chairman of the Supervisory Board: Gerhard Cromme;
Managing Board: Peter Loescher, Chairman, President and Chief Executive Officer;
Heinrich Hiesinger, Joe Kaeser, Rudi Lamprecht, Eduardo Montes, Juergen Radomski,
Erich R. Reinhardt, Hermann Requardt, Uriel J. Sharef, Peter Y. Solmssen, Klaus Wucherer;
Registered offices: Berlin and Munich;
Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB 6684;
WEEE-Reg.-No. DE 23691322
---
You are currently subscribed to vrf as: gary.voltz@airservicesaustralia.com
To subscribe please send an email to: "vrf-request@lists.it.agilent.com" with the word subscribe in the message body.
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".
Search the "unofficial vrf archive" at "http://www.vrfarchive.com/vrf_archive".
Search the Agilent vrf archive at "http://vee.engineering.agilent.com".
---
You are currently subscribed to vrf as: ming_meng@agilent.com
To subscribe please send an email to: "vrf-request@lists.it.agilent.com" with the word subscribe in the message body.
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".
Search the "unofficial vrf archive" at "http://www.vrfarchive.com/vrf_archive".
Search the Agilent vrf archive at "http://vee.engineering.agilent.com".
I can't figure out how to control the size of a Statusbar control properly at runtime. I can set the height of the control, but the width remains unchanged (when I read it back and visually) whether I set it using
Statusbar.width or
Statusbar.size or
Statusbar.size.width
MSDN has this statement in the documentation:
Because the Size class is a value type (Structure in Visual Basic, struct in Visual C#), it is returned by value, meaning accessing the property returns a copy of the size of the control. So, adjusting the HYPERLINK "http://msdn2.microsoft.com/en-us/library/betxbs3a(VS.80).aspx"Width or HYPERLINK "http://msdn2.microsoft.com/en-us/library/tk7tftxw(VS.80).aspx"Height properties of the Size returned from this property will not affect the HYPERLINK "http://msdn2.microsoft.com/en-us/library/bk74axfh(VS.80).aspx"Width or HYPERLINK "http://msdn2.microsoft.com/en-us/library/k9w3e9xh(VS.80).aspx"Height of the control. To adjust the Width or Height of the control, you must set the control's Width or Height property, or set the Size property with a new Size.
Which is clear as mud to me (isn't that what I'm doing?). Can anybody shed some light on this?
BTW, I have the same issue with the RichTextBox, though it actually returns the height and width as set, but the box hasn't changed it's size visually.
Thanks,
Best regards
Reiner Schlieker
Test Equipment Designer
Siemens AG
Automation and Drives, Siemens Milltronics Process Instruments Inc.
Tel. : +1 (705) 740-7553
Fax : +1 (705) 740-7692
mailto:reiner.schlieker@siemens.com
http://www.siemens.com/automationhttp://www.siemens.com/automation
Siemens Aktiengesellschaft: Chairman of the Supervisory Board: Gerhard Cromme;
Managing Board: Peter Loescher, Chairman, President and Chief Executive Officer;
Heinrich Hiesinger, Joe Kaeser, Rudi Lamprecht, Eduardo Montes, Juergen Radomski,
Erich R. Reinhardt, Hermann Requardt, Uriel J. Sharef, Peter Y. Solmssen, Klaus Wucherer;
Registered offices: Berlin and Munich;
Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB 6684;
WEEE-Reg.-No. DE 23691322
---
You are currently subscribed to vrf as: ming_meng@agilent.com
To subscribe please send an email to: "vrf-request@lists.it.agilent.com" with the word subscribe in the message body.
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".
Search the "unofficial vrf archive" at "http://www.vrfarchive.com/vrf_archive".
Search the Agilent vrf archive at "http://vee.engineering.agilent.com".