Microsoft KB Archive/138425

= PRB: No Visual Clue to Number of Lines Edit or Text Box Holds =

Article ID: 138425

Article Last Modified on 2/11/2000

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition

-



This article was previously published under Q138425



SYMPTOMS
When you work with a text or edit box on a form, there are no visual clues in Visual FoxPro that indicate how many lines of text will actually be displayed. In FoxPro version 2.6, lines appear that give an indication of how many lines of text will be displayed in these two objects.



WORKAROUND
The default scale mode for Visual FoxPro is pixels. To specify an approximate number of lines to be displayed in these objects:


 * 1) Set the form ScaleMode property to Foxels.
 * 2) Select the object.
 * 3) Change the value of the object's Height property (in the Properties sheet under the Layout tab) to the number of lines of text you want to display in the object.



STATUS
Microsoft is researching this behavior and will post new information here in the Microsoft Knowledge Base as it becomes available.



MORE INFORMATION
The font such as MS San Serif, the font size, and font attributes can all affect the actual number of lines of text displayed.

Steps to Reproduce Behavior
  In the Command window, enter these commands: SET DEFAULT TO SYS(2004)+"\SAMPLES\DATA" OPEN DATA testdata CREATE FORM myform  On View menu, click Data Environment to open the data environment. Then on the DataEnvironment menu, click Add. In the Add dialog box, choose the Employee table, and click OK. Select the Notes field in the Employee table, and drag it from the Data Environment onto the form to create an edit box. Adjust the size to display several lines of text. With the form selected, click Properties on the View menu, and make sure Form1 is selected. Under the Layout tab, set the ScaleMode to Foxels.  Choose the Edit1 object. Under the Layout tab, set the following properties:   Height    3.5 FontName Arial FontBold .T.   FontSize  10 </li> Under the Data tab, set the ControlSource to employee.notes.</li> Run the form.</li></ol>

Although you've specified a height of 3.5, three lines of text should display. This demonstrates some of the behaviors noted earlier in this article. To display four lines of text, set the Height property to 4.5. Setting the ScaleMode back to Pixels will change this number to a value consistent with pixel measurements.

Additional query words: VFoxWin EditBox TextBox

Keywords: KB138425

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.