SldSetPos Function

Microchip Graphics Library

Microchip Graphics Library
SldSetPos Function
C
void SldSetPos(
    SLIDER * pSld, 
    SHORT newPos
);
Overview

This function sets the position of the slider thumb. Value should be in the set range inclusive. Object must be redrawn to reflect the change.

Input Parameters
Input Parameters 
Description 
SLIDER * pSld 
Pointer to the object. 
SHORT newPos 
The new position of the slider's thumb. 
Returns

none

Preconditions

none

Side Effects

none

Example
SLIDER *pSlider;
DWORD ctr = 0;

    // create slider here and initialize parameters
    SetState(pSlider, SLD_DRAW);
    SldDraw(pSlider);

    while("some condition") {
        SldSetPos(pSlider, ctr);
        SetState(pSlider, SLD_DRAW_THUMB);
        SldDraw(pSlider);
        // update ctr here
        ctr = "some source of value";
    }
Microchip Graphics Library Version 3.06.02 - October 15, 2012
Copyright © 2012 Microchip Technology, Inc.  All rights reserved