Hi,
// Use this below code in clicked method for your button placed in form.
str filename;
FileNameFilter filter = ['JPG files','*.jpg'];
Bindata binData;
Image signatureImage = new Image();
super();
filename = Winapi::getOpenFileName(element.hWnd(), filter, '', "Upload your image", '', '');
binData = new BinData();
if (binData.loadFile(filename))
{
signatureImage = binData.getData();
WindowField.image(signatureImage); // WindowField - is the window field and make it auto declaration : Yes
WindowField.widthValue(signatureImage.width());
WindowField.heightValue(signatureImage.height());
element.resetSize();
element.unLock();
}
Note: this code stows the record but not stores the record in table.
Regards,
// Use this below code in clicked method for your button placed in form.
str filename;
FileNameFilter filter = ['JPG files','*.jpg'];
Bindata binData;
Image signatureImage = new Image();
super();
filename = Winapi::getOpenFileName(element.hWnd(), filter, '', "Upload your image", '', '');
binData = new BinData();
if (binData.loadFile(filename))
{
signatureImage = binData.getData();
WindowField.image(signatureImage); // WindowField - is the window field and make it auto declaration : Yes
WindowField.widthValue(signatureImage.width());
WindowField.heightValue(signatureImage.height());
element.resetSize();
element.unLock();
}
Note: this code stows the record but not stores the record in table.
Regards,
No comments:
Post a Comment