FIX: Label Set to Autosize Is Not Wide Enough

ID: Q180847


The information in this article applies to:
  • Microsoft Windows CE Toolkit for Visual Basic 5.0, version 1.0


SYMPTOMS

When the Autosize property of a label control is set to True, the right- most character may not be entirely visible.


RESOLUTION

To work around the problem, you can either size labels manually, or, if you are using the Autosize property to compensate for a changing label caption at run-time, add code to the Change event of the label to resize it after the Caption property is changed, as follows:


   Private Sub Label1_Change()
      Label1.Width = Label1.Width + 50
   End Sub 


STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.

This problem was corrected in Windows CE Toolkit for Visual Basic 6.0.


MORE INFORMATION

Steps to Reproduce Behavior

  1. Open a new Windows CE project in Visual Basic 5.0. Form1 is created by default.


  2. Add a label to Form1.


  3. Change the Caption property of the label to "Can you see me?"


  4. Set the Autosize property of the label to True.


  5. Press the F5 key to run the project and note that approximately half of the question mark is visible.


Additional query words: vbce vbce5 vbce6

Keywords : kbToolkit kbVBp kbVBp500bug kbVBp600fix kbWinCE kbWinCE100 kbGrpVB
Version : WINDOWS:1.0
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: February 25, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.