![]() |
adjust the height of a label
Hi all,
A label on my form will be filled by a muti-line of comment, the line number is variable, so how to make the label adjust to it programmically. Clara thank you so much for your help |
adjust the height of a label
Clara,
In Excel 2003, you can set the AutoSize property of the label to True. -- Hope that helps. Vergel Adriano "clara" wrote: Hi all, A label on my form will be filled by a muti-line of comment, the line number is variable, so how to make the label adjust to it programmically. Clara thank you so much for your help |
adjust the height of a label
Hi Vergel,
Thank you very much! Let's drill things down a little. Below the label, there is a textbox, so when the label is growing automatically downwards, the position of the textbox is also needed to shift down accordingly. How I can do it? Clara thank you so much for your help "Vergel Adriano" wrote: Clara, In Excel 2003, you can set the AutoSize property of the label to True. -- Hope that helps. Vergel Adriano "clara" wrote: Hi all, A label on my form will be filled by a muti-line of comment, the line number is variable, so how to make the label adjust to it programmically. Clara thank you so much for your help |
adjust the height of a label
Clara,
Each time you change the contents of the label, you can push your textbox down. As an example, the code below always puts TextBox1 5 pixes below Label1. Label1.Caption = strSomeReallyLongText TextBox1.Top = Label1.Top + Label1.Height + 5 If you have more controls below the label that need to move down, consider placing the controls in a Frame control. That way, you only need to move the Frame and not have to worry about each individual control. Label1.Caption = strSomeReallyLongText Frame1.Top = Label1.Top + Label1.Height + 5 -- Hope that helps. Vergel Adriano "clara" wrote: Hi Vergel, Thank you very much! Let's drill things down a little. Below the label, there is a textbox, so when the label is growing automatically downwards, the position of the textbox is also needed to shift down accordingly. How I can do it? Clara thank you so much for your help "Vergel Adriano" wrote: Clara, In Excel 2003, you can set the AutoSize property of the label to True. -- Hope that helps. Vergel Adriano "clara" wrote: Hi all, A label on my form will be filled by a muti-line of comment, the line number is variable, so how to make the label adjust to it programmically. Clara thank you so much for your help |
All times are GMT +1. The time now is 11:07 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com