Microsoft HomeProductsSearchSupportShopWrite Usspacer.gif Microsoft Home
AFC Samples
 In this topic

*Description

*Sources

 

AFC Samples   PreviousAFC SamplesNext
    Previous AFC
Samples
Next

 


Statics Sample Applet

This sample shows the various ways you can position and combine AFC's static controls.

Description

The panel above tells an epic tale. It organizes various controls on the left side of the applet that enable you to move and change the static control that is displayed.

The default static displayed is a UIItem control (an image and text combination static). Clicking the UIText radio button option in the Static Components group replaces the image and text combination with text only, and clicking UIGraphic replaces the text with an image static.

When a UIItem (both image and text) is displayed, the Image Placement group is activated. Selecting either of the image placement options allows you to change the placement of the image, relative to the text.

Select one of the points of the compass in the Alignment group to see the possible orientations of the static displayed. By dragging the mouse over the compass image, you can adjust the corresponding orientation of the static more smoothly.

Other statics demonstrated in this sample include the following:
UIGroup By deselecting this, you'll notice the border and text around the image display panel disappear.
UIDrawText This gives you static, noneditable text.
UIStatus This gives you the position of the ship.

By unchecking and rechecking the check boxes in the Other Statics group, you'll see these controls appear and disappear. A final note regarding UIDrawText: Simply placing UIDrawText in a ScrollViewer gives it full scrolling capabilities.

Sources

This sample applet consists of the following sources:
SDKSample.java
SDKConsts.java
SDKCtrlPnl.java
SDKImages.java
SDKCallbacks.java
SDKInsetPanel.java

Top