Scrolls Sample
This sample is located in \Samples\afc102\Scrolls.
Description
Using the Sample
Key Project Files
Technologies Demonstrated
Description
This sample shows how to use the AFC scroll controls and the progress monitoring control. The sample displays a panel that contains the following components:
- UISpinner, a spin box control with an associated series of 32 .gif images of the Sun.
- UISpinnerEdit, a spin box control with an associated edit box. This control is composed of a UISpinner and a UIEdit control.
- UIScrollBar, a scroll bar control.
- UIProgress, a progress monitoring control.
- UISlider, a slider control. The center slider of this control tracks the scroll position of all the other scroll controls in the sample.
All the scroll controls are interdependent; changing any one scroll position changes all the other scroll positions.
Using the Sample
To use the sample
You can manipulate the sample's components by performing the following actions:
- Click the arrows in the UISpinner control to animate the image so that the Sun appears to rise or fall in the sky.
- Use the keyboard to enter a number in the edit box of the UISpinnerEdit control. The number should correspond to one of the scroll positions used in the example (between 0 and 128). The number can also be changed by clicking the arrows.
- Move the slider of the UIScrollBar by dragging it with the mouse or by clicking the arrows at either end of the trough that contains the slider. These arrows represent line increments and decrements of the scroll position. Click in the trough of the control to obtain the page increment or decrement of the scroll position.
- Move the center slider on the UISlider control to change the positions of the other scroll controls. Moving the indicator on the left slider track defines the start of a selected area within the control, and moving the right indicator defines the end of a selected area.
Key Project Files
ProgressPnl.java
This class extends UIPanel and implements SDKConsts. It creates the progress monitoring control.
ScrollBarPnl.java
This class extends UIPanel and implements SDKConsts. It creates the scroll bar control.
SliderPnl.java
This class extends UIPanel and implements SDKConsts. It creates the slider controls.
SpinnerEditPnl.java
This class extends UIPanel and implements SDKConsts and IFxTextConstants. It creates the spin box control and associated edit box.
SpinnerPnl.java
This class extends UIPanel and implements SDKConsts. It creates a spin box control that is associated with 32 images.
Technologies Demonstrated
AFC
- This sample shows how to use AFC classes to create scroll, spin box, slider, and progress monitoring controls.
© 1999 Microsoft Corporation. All rights reserved. Terms of use.