mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
*Controls4U_Demo: Fixed THISBACK problem...
git-svn-id: svn://ultimatepp.org/upp/trunk@15130 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
ef1aabe005
commit
f8d09727ff
2 changed files with 7 additions and 7 deletions
|
|
@ -5,7 +5,7 @@ END_LAYOUT
|
|||
|
||||
LAYOUT(EditFileFolder, 468, 200)
|
||||
ITEM(StaticImage, clipImage, SetBackground(Color(229, 229, 229)).SetFrame(ThinInsetFrame()).HSizePosZ(260, 8).VSizePosZ(8, 12))
|
||||
ITEM(EditFile, FileName, LeftPosZ(8, 240).TopPosZ(28, 19))
|
||||
ITEM(EditFile, fileName, LeftPosZ(8, 240).TopPosZ(28, 19))
|
||||
ITEM(Label, dv___2, SetLabel(t_("Insert image name")).LeftPosZ(8, 240).TopPosZ(8, 19))
|
||||
ITEM(DropList, imageFit, LeftPosZ(56, 84).TopPosZ(76, 19))
|
||||
ITEM(Label, dv___4, SetLabel(t_("SetFit")).LeftPosZ(8, 48).TopPosZ(76, 19))
|
||||
|
|
|
|||
|
|
@ -73,10 +73,10 @@ GUI_APP_MAIN {
|
|||
EditFileFolder_Demo::EditFileFolder_Demo() {
|
||||
CtrlLayout(*this);
|
||||
|
||||
FileName.ActiveDir(GetDesktopFolder());
|
||||
FileName.Type("Image files", "*.png, *.jpg, *.jpeg, *.tif*, *.bmp, *.gif");
|
||||
FileName.AllFilesType();
|
||||
FileName.WhenChange = THISBACK(OnNewFile);
|
||||
fileName.ActiveDir(GetDesktopFolder());
|
||||
fileName.Type("Image files", "*.png, *.jpg, *.jpeg, *.tif*, *.bmp, *.gif");
|
||||
fileName.AllFilesType();
|
||||
fileName.WhenChange = [=]{return OnNewFile();};
|
||||
angleList.Add(0, "0º").Add(1, "90º").Add(2, "180º").Add(3, "270º").SetData(0);
|
||||
angleList.WhenAction = THISBACK(ChangeProperties);
|
||||
imageFit.Add(0, "BestFit").Add(1, "FillFrame").Add(2, "NoScale").Add(3, "RepeatToFill").SetData(0);
|
||||
|
|
@ -85,8 +85,8 @@ EditFileFolder_Demo::EditFileFolder_Demo() {
|
|||
back.Set(Images::paper());
|
||||
}
|
||||
bool EditFileFolder_Demo::OnNewFile() {
|
||||
if (!clipImage.Set(~FileName)) {
|
||||
if (FileExists(~FileName)) {
|
||||
if (!clipImage.Set(~fileName)) {
|
||||
if (FileExists(~fileName)) {
|
||||
Exclamation("File not found");
|
||||
return false;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue