Setting the TIWImageButton.OnClick event below works fine... when button is clicked, OnClick fires... exact same code, setting TIWAdvImageButton.OnClick event does not fire when clicked.
Works great...
Cell[iRow,9].Control := TIWImageButton.Create(Self);
TIWImageButton(Cell[iRow,9].Control).ImageFile.Filename := './files/pdf.jpg';
TIWImageButton(Cell[iRow,9].Control).OnClick := Self.imageCaseFilePDFClick;
// These Javascript commands are required so that the screen does not get locked after clicking
TIWImageButton(Cell[iRow,9].Control).ScriptEvents.Add('ReleaseLock();');
TIWImageButton(Cell[iRow,9].Control).ScriptEvents.Add('GActivateLock=false;');
TIWImageButton(Cell[iRow,9].Control).ScriptEvents.Add('return true;');
TIWImageButton(Cell[iRow,9].Control).ImageFile.Filename := './files/pdf.jpg';
TIWImageButton(Cell[iRow,9].Control).OnClick := Self.imageCaseFilePDFClick;
// These Javascript commands are required so that the screen does not get locked after clicking
TIWImageButton(Cell[iRow,9].Control).ScriptEvents.Add('ReleaseLock();');
TIWImageButton(Cell[iRow,9].Control).ScriptEvents.Add('GActivateLock=false;');
TIWImageButton(Cell[iRow,9].Control).ScriptEvents.Add('return true;');
Doesn't work...
Cell[iRow,9].Control := TTIWAdvImageButton.Create(Self);
TTIWAdvImageButton(Cell[iRow,9].Control).Picture := jpgPDF;
TTIWAdvImageButton(Cell[iRow,9].Control).OnClick := Self.imageCaseFilePDFClick;
// These Javascript commands are required so that the screen does not get locked after clicking
TTIWAdvImageButton(Cell[iRow,9].Control).ScriptEvents.Add('ReleaseLock();');
TTIWAdvImageButton(Cell[iRow,9].Control).ScriptEvents.Add('GActivateLock=false;');
TTIWAdvImageButton(Cell[iRow,9].Control).ScriptEvents.Add('return true;');
Cell[iRow,9].Control := TTIWAdvImageButton.Create(Self);
TTIWAdvImageButton(Cell[iRow,9].Control).Picture := jpgPDF;
TTIWAdvImageButton(Cell[iRow,9].Control).OnClick := Self.imageCaseFilePDFClick;
// These Javascript commands are required so that the screen does not get locked after clicking
TTIWAdvImageButton(Cell[iRow,9].Control).ScriptEvents.Add('ReleaseLock();');
TTIWAdvImageButton(Cell[iRow,9].Control).ScriptEvents.Add('GActivateLock=false;');
TTIWAdvImageButton(Cell[iRow,9].Control).ScriptEvents.Add('return true;');
It's as if the TTIWAdvImageButton.OnClick event is either never set, or it reset to nil.
Thank you in advance for any insight you can provide!
Scott Gast
S2 Software
Texas, USA
Delphi 2010 / Intraweb 10 / TMS Suite Script Edition