static void ImageField1(Args _args) { BinData binData = new BinData(); A_ImageTable table; dialog d; Dialog dialog = new dialog(); dialogField dialogFilename; FileName fileName; container imageContainer; str imageFilePathName; d = new dialog(); d.caption("select a file"); dialogFilename = d.addField(extendedTypeStr(FilenameOpen),"File Name");//add a field where you select your file in a specific path d.run();//execute dialog if(d.closedOk()) { filename = dialogFileName.value();//return path file value } imageFilePathName=filename; if ( WinAPI::fileExists(imageFilePathName)) { binData.loadFile(imageFilePathName); imageContainer = binData.getData(); table.Image = imageContainer; table.insert(); } }
↧
Save Selected Image in Table
↧