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

FileSelPreview

 

Demonstrates the file preview option of FileSel

 

 

main.cpp

 

#include <CtrlLib/CtrlLib.h>

 

using namespace Upp;

 

class PreviewImage : public ImageCtrl {

    void SetData(const Value& val) {

        String path = val;

        if(IsNull(path.IsEmpty()))

            SetImage(Null);

        else

            SetImage(StreamRaster::LoadFileAny(~path));

    }

};

 

 

GUI_APP_MAIN

{

    PreviewImage img;

    FileSel      fs;

    

    fs.Type("Image file(s)", "*.jpg *.gif *.png *.bmp");

    fs.Preview(img);

    

    fs.ExecuteOpen();

}

 

 

 

 

Do you want to contribute?