The following tasks are associated with using an ISlider* part in visual composition. Tasks that are common to many parts are described in related topics.
| Location of the scale | ||
|---|---|---|
| |
scale1 | scale2 |
| Horizontal orientation | Above the shaft | Below the shaft |
| Vertical orientation | Right side of the shaft | Left side of the shaft |
For example, if you want the user to set a rating from 0 to 100 with a primary scale marked at intervals of 10 and a secondary scale marked at intervals of 5, you could enter the following code:
int i;
target->setPrimaryScale(IProgressIndicator::scale1);
target->setTicks(IProgressIndicator::scale1, 101);
for (i = 0; i < 101; i += 10)
{
target->setTickLength(i, 10);
target->setTickText(i, IString(i));
}
target->setPrimaryScale(IProgressIndicator::scale2);
target->setTicks(IProgressIndicator::scale2, 101);
for (i = 0; i < 101; i += 5)
{
target->setTickLength(i, 5);
target->setTickText(i, IString(i));
}
If you do not want slider buttons, set all of these styles to off.
The location of the home position depends on the
orientation of the slider and the home position value you
specify:
| Location of the home position | ||
|---|---|---|
| |
homeBottomLeft | homeTopRight |
| Horizontal orientation | Left end of the shaft | Right end of the shaft |
| Vertical orientation | Bottom end of the shaft | Top end of the shaft |
Common Tasks for Control Parts
Setting Part Style Properties
Setting Part Color Properties
Setting Part Font Properties
Setting Part Handlers
Properties
Setting Part Framing Properties
Working with VisualAge User
Interface Parts
ISlider
Property Settings --
ISlider
Portability -- ISlider
