Text Too Narrow with Italic Fonts in Visual Basic Labels

ID Number: Q79117

1.00

WINDOWS

buglist1.00

Summary:

When the FontItalic property of a label control is set to True (-1),

the text in the caption property is incorrectly formatted into lines

that are about half as wide as the label width.

When the FontItalic property is set to False (0), the text is

correctly formatted so that each line of text correctly occupies the

width of the label.

Microsoft has confirmed this to be a problem in Visual Basic

programming system version 1.0 for Windows. We are researching this

problem and will post new information here as it becomes available.

More Information:

Workaround

----------

To work around this problem, use any one of the following

alternatives:

- Make the label wider so that the text appears as desired.

- Set the AutoSize property on the label to True (-1). Note that this

will format the label caption into one line of text.

- Create several labels, one for each line of text.

- Set the FontItalic property to False (0).

Steps to Reproduce Problem

--------------------------

1. Start Visual Basic. From the File menu, choose New Project (ALT, F,

N). Form1 will be created by default.

2. Place a label (Label1) on Form1.

3. Set the label's Caption property to "This is a line of text"

(without the quotation marks).

4. Make the label just wide enough to display the entire caption on

one line. Make the label tall enough to display three or four lines

of text.

4. Set the FontItalic property to True. The caption is incorrectly

formatted as two lines.

5. If you further reduce the width of the label, it incorrectly

formats the lines to about half the new width of the label.

Additional reference words: 1.00