Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / COM / June 2005



Tip: Looking for answers? Try searching our database.

Resizing text on the label while resizing that label

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
balu - 15 Jun 2005 07:53 GMT
Hi all,

              I am developing  an application in vb . I am able to resize
label or  textbox on the vb form at runtime but text on the label or textbox
is not automatically  adjusting to the new label or textbox size .

I need some suggestions or vb code to solve this problem.

Kindly reply me as soon as possible.

Any Kind of help is appreciable.

Thank You,
Balu.
Anuradha Thennakoon - 15 Jun 2005 08:14 GMT
this will help you

Private Sub Text1_Change()
Dim a As Integer
a = Len(Text1.Text)

If a > 7 Then
Text1.Width = Text1.Width + 100
End If

End Sub

Anuradha
> Hi all,
>
[quoted text clipped - 10 lines]
> Thank You,
> Balu.
Bob Butler - 15 Jun 2005 13:06 GMT
> Hi all,
>
>                I am developing  an application in vb . I am able to
> resize label or  textbox on the vb form at runtime but text on the
> label or textbox is not automatically  adjusting to the new label or
> textbox size .

What version of VB?
How are you resizing the controls at runtime?
What do you mean that the text is not adjusting?  What is not happening that
you expect?

Signature

Reply to the group so all can participate
VB.Net: "Fool me once..."

Andy DF - 16 Jun 2005 09:00 GMT
Have you thought of using an Image control instead?

1) Use a picturebox, print some test to it.
2) Set Image1.Picture = Picture1.Image
3) Image1.Stretch = True

HTH

Signature

Andy,

andreaATdstudio32DOTit

> Hi all,
>
[quoted text clipped - 11 lines]
> Thank You,
> Balu.
Dave - 16 Jun 2005 12:23 GMT
Balu,

You need to look at the Font Property (txtControl.Font.Size = 13.5).
Labels and Textboxes don't automatically adjust the font to match their
size.
Also, if you need to adjust the size of Comboboxes, they ARE automatically
adjusted by the font.
I'm sure someone here can further elaborate.

HTH

Dave

> Hi all,
>
[quoted text clipped - 10 lines]
> Thank You,
> Balu.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.