Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site











SourceForge.net Logo

Slider

 

SliderCtrl example

 

 

 

main.cpp

 

#include <CtrlLib/CtrlLib.h>

 

using namespace Upp;

 

struct App : TopWindow {

    StaticRect        dynarect;

    SliderCtrl        slider;

    Label             text;

 

    void Slider() {

        dynarect.SetRectX(50, ~slider);

        text = "\1[C6*/@b " + AsString(~slider);

    }

 

    typedef App CLASSNAME;

 

    App() {

        Sizeable().Zoomable();

 

        slider << THISFN(Slider);

        slider.Range(700);

        slider <<= 250;

        Add(slider.BottomPosZ(5, 30).HSizePos(10, 10));

        Slider();

 

        dynarect.Color(SRed);

        Add(dynarect.VSizePos(40, 40));

 

        Add(text.LeftPos(0, 200).TopPos(0, 40));

    }

};

 

GUI_APP_MAIN

{

    App().Run();

}

 

 

 

 

Do you want to contribute?