CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Dialog Button.Visible property not working

by ScottWGast » 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.

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;


dialog.png

(Event Self.CloseModalDialog is smart enough to know which button is pressed)

Scott

DXE2Updt4/IW14.0.52/CG2.9.0.251
You do not have the required permissions to view the files attached to this post.
ScottWGast
 
Posts: 875
Joined: 23 May 2012 11:02

by ScottWGast » 17 May 2016 22:23

I cannot duplicate the error in a small demo.

I will continue to investigate why the non-visible buttons are being shown.
ScottWGast
 
Posts: 875
Joined: 23 May 2012 11:02


Return to JQDialog

cron

Who is online

Users browsing this forum: No registered users and 2 guests

Contact Us.