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.