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











SourceForge.net Logo

SourceForge.net Logo

GitHub Logo

Discord Logo

SliderProgressInd

 

Combined Slider and Progress example

 

 

 

main.cpp

 

#include <CtrlLib/CtrlLib.h>

 

using namespace Upp;

 

struct App : TopWindow {

    ProgressIndicator progress;

    SliderCtrl        slider;

    Label             text;

 

    typedef App CLASSNAME;

 

    App() {

        *this << slider.BottomPosZ(5, 30).HSizePos(10, 10)

              << progress.VSizePosZ(10, 40).HCenterPos(40)

              << text.LeftPosZ(5, 200).TopPosZ(5, 40);

        slider << [=] {

            progress.Set(~slider, 100);

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

        };

        slider.Range(100);

        slider <<= 50;

        slider.WhenAction();

        Sizeable().Zoomable();

    }

};

 

GUI_APP_MAIN

{

    App().Run();

}

 

 

 

SliderProgressInd.lay

 

LAYOUT(SliderProgressIndLayout, 200, 100)

END_LAYOUT

 

 

 

 

 

Do you want to contribute?