diff --git a/bazaar/Controls4U_Demo/Controls4U_Demo.lay b/bazaar/Controls4U_Demo/Controls4U_Demo.lay index c0391128f..70d0d129b 100644 --- a/bazaar/Controls4U_Demo/Controls4U_Demo.lay +++ b/bazaar/Controls4U_Demo/Controls4U_Demo.lay @@ -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)) diff --git a/bazaar/Controls4U_Demo/main.cpp b/bazaar/Controls4U_Demo/main.cpp index 3de329940..b459d489e 100644 --- a/bazaar/Controls4U_Demo/main.cpp +++ b/bazaar/Controls4U_Demo/main.cpp @@ -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 {