Dialog Button.Visible property not working
Posted: 17 May 2016 20:46
It seems that the dialog's buttons .Visible property is not being processed when the dialog is rendered. The buttons always display even if their .Visible property is False.
(Event Self.CloseModalDialog is smart enough to know which button is pressed)
Scott
DXE2Updt4/IW14.0.52/CG2.9.0.251
- Code: Select all
Self.dialogModal.JQDialogOptions.Buttons.Clear;
buttonDialog := Self.dialogModal.JQDialogOptions.Buttons.Add;
buttonDialog.Text := C_DIALOG_BUTTON_CAPTION_CANCEL;
buttonDialog.OnClick.OnEvent := Self.CloseModalDialog;
buttonDialog.Visible := True;
iCancelButtonIndex := buttonDialog.Index;
buttonDialog := Self.dialogModal.JQDialogOptions.Buttons.Add;
buttonDialog.Text := C_DIALOG_BUTTON_CAPTION_CLOSE;
buttonDialog.OnClick.OnEvent := Self.CloseModalDialog;
buttonDialog.Visible := False;
iCloseButtonIndex := buttonDialog.Index;
buttonDialog := Self.dialogModal.JQDialogOptions.Buttons.Add;
buttonDialog.Text := C_DIALOG_BUTTON_CAPTION_SAVE;
buttonDialog.OnClick.OnEvent := Self.CloseModalDialog;
buttonDialog.Visible := True;
iSaveButtonIndex := buttonDialog.Index;
(Event Self.CloseModalDialog is smart enough to know which button is pressed)
Scott
DXE2Updt4/IW14.0.52/CG2.9.0.251