PC Review


Reply
Thread Tools Rate Thread

adjust the height of a label

 
 
=?Utf-8?B?Y2xhcmE=?=
Guest
Posts: n/a
 
      19th Mar 2007
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
 
Reply With Quote
 
 
 
 
=?Utf-8?B?VmVyZ2VsIEFkcmlhbm8=?=
Guest
Posts: n/a
 
      19th Mar 2007
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

 
Reply With Quote
 
=?Utf-8?B?Y2xhcmE=?=
Guest
Posts: n/a
 
      19th Mar 2007
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

 
Reply With Quote
 
=?Utf-8?B?VmVyZ2VsIEFkcmlhbm8=?=
Guest
Posts: n/a
 
      19th Mar 2007
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

 
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
Auto adjust label height =?Utf-8?B?c3luYw==?= Microsoft Dot NET Compact Framework 0 17th Jun 2006 07:58 PM
adjust font to label height? =?Utf-8?B?VGltIFJhbWw=?= Microsoft Dot NET Compact Framework 5 23rd Jul 2005 08:09 AM
adjust height from vba =?Utf-8?B?RGFu?= Microsoft Access 1 23rd May 2005 11:44 PM
RE: adjust height from vba =?Utf-8?B?RGFu?= Microsoft Access 0 23rd May 2005 11:15 PM
VBA to adjust Row Height Bob Microsoft Excel Misc 1 9th Apr 2004 09:18 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:30 AM.