JavaScript Editor js editor     Web development 

Main Page

One of the principles of good design is to make relevant information visible. You can use the following controls to display information to your users:

Using Images

The Image control makes it possible for you to add pictures (.bmp and other graphics files) to your form. An Image control has the full range of properties, events, and methods that other controls have, so an Image control can be changed dynamically at run time, Users can interact with images by clicking, double-clicking, and so on. For details on valid graphic file types, see Graphics Support in Visual FoxPro.

The following table lists some of the key properties of an Image control.

Property Description


The picture (.bmp file) to display.


Whether there is a visible border for the image.


If Stretch is set to 0 – Clip, portions of the picture that extend beyond the dimensions of the Image control are not displayed. If Stretch is set to 1 - Isometric, the Image control preserves the original dimensions of the picture and displays as much of the picture as the dimensions of the Image control will allow. If Stretch is set to 2 - Stretch, the picture is adjusted to exactly match the height and width of the Image control.

Using Labels

Labels differ from text boxes in that they:

  • Cannot have a data source.

  • Cannot be directly edited.

  • Cannot be tabbed to.

You can programmatically change the Caption and Visible properties of labels to tailor the label display to the situation at hand.

Common Label Properties

The following label properties are commonly set at design time.

Property Description


The text displayed by the label.


Whether the size of the label is adjusted to the length of the Caption.


Whether the label is Opaque or Transparent.


Whether the text displayed on the label can wrap to additional lines.

Using Text and Edit Boxes to Display Information

Set the ReadOnly property of text and edit boxes to display information that the user can view but not edit. If you only disable an edit box, the user will not be able to scroll through the text.

Using Shapes and Lines

Shapes and lines help you visually group elements of your form together. Research has shown that associating related items helps users to learn and understand an interface, which makes it easier for them to use your application.

The following Shape properties are commonly set at design time.

Property Description


A value between 0 (90 degree angles) and 99 (circle or oval).


Whether the shape is transparent or has a specified background fill pattern.


Whether the shape is plain or 3D. This only has an effect when the Curvature property is set to 0.

The following Line properties are commonly set at design time.

Property Description


How many pixels wide the line is.


When the line is not horizontal or vertical, the direction of the slant. Valid values for this property are a slash (В /В ) and a backslash (В \В ).

Using Form Graphics to Display Information

You can graphically display information on a form by using the following form methods.

Method Description


Draws a circular figure or arc on a form.


Clears graphics and text from a form.


Draws a line on a form.


Sets a point on a form to a specific color.


Prints a character string on a form.

To see examples that demonstrate form graphics, run in the Visual FoxPro ...\Samples\Solution directory. In the tree view, click Forms, and then click Form graphics.

See Also

JavaScript Editor js editor     Web development