Page 1 of 1

ZIndex

PostPosted: 22 Nov 2014 18:49
by jredoc
Hello

cg 2.4.0.91
IW 14.0.34

I have a IWCGJQDialog on which multiple IWCGJQEdits reside. The IWCGJQEdits are attached to a kbmMemTable. The Zindex of the IWCGJQedits are set to a higher value in the OnCreate event of the frame on which the IWCGJQDialgoEx resides.

The following code will display the IWCGJQDialog. An image of the IWCGJQDialog is shown below the code.

procedure TIWCGFrame_PtInfo.IWCGJQRadioButtonExNewGeneralDentistJQRadioOptionsClick(Sender: TObject; AParams: TStringList);
begin
if UserSession.tempGeneralDentistType = 'Original' then
begin
IWCGJQRadioButtonExNewGeneralDentist.Caption := 'View Proposed General Dentist';
IWCGJQRadioButtonExNewGeneralDentist.Checked := True;
UserSession.tempGeneralDentistType := 'Proposed';

with UserSession.kbmMemTableGeneralDentist do
begin
EmptyTable;
Insert;
Post;
end;

IWCGJQDialogExNewGeneralDentist.Visible := True;
IWCGJQDialogExNewGeneralDentist.AjaxReRender(False, False);
end;
end;

Form_1.jpg


From the displayed dialog (shown above) I can click the edit button on the navigator and the fields will be enabled and editable. See image below.

Form_2.jpg


The problem::
If I wrap the above code inside a modal IWCGJQMessage dialog, the IWCGJQDialogEx.will still display and when the edit button on the navigator is pressed the edits appear enabled, i.e. dialog appears just as it does in the two images above. However, the edits are, in fact, not editable. The code with the IWCGJQMessage is shown below.

procedure TIWCGFrame_PtInfo.IWCGJQRadioButtonExNewGeneralDentistJQRadioOptionsClick(Sender: TObject; AParams: TStringList);
var
tempDlg: TIWCGJQMsgDialog;
begin
if UserSession.tempGeneralDentistType = 'Original' then
begin
tempDlg := IWCGMessageDlg('Do you wish to replace the patient''s original general dentist record with a new unlisted general dentist?',
mtConfirmation, [mbYes, mbNo],
procedure(ADlg: TIWCGJQMsgDialog; AModalResult: TModalResult)
begin
if AModalResult = mrYes then // By definition the AModalResult will be mrOK
begin
IWCGJQRadioButtonExNewGeneralDentist.Caption := 'View Proposed General Dentist';
IWCGJQRadioButtonExNewGeneralDentist.Checked := True;
UserSession.tempGeneralDentistType := 'Proposed';

with UserSession.kbmMemTableGeneralDentist do
begin
EmptyTable;

Insert;
Post;
end;
IWCGJQDialogExNewGeneralDentist.Visible := True;
IWCGJQDialogExNewGeneralDentist.AjaxReRender(False, True);
end;

if AModalResult = mrNo then // By definition the AModalResult will be mrOK
begin
IWCGJQRadioButtonExNewGeneralDentist.Checked := False;
end;
end
);
tempDlg.Height := 175;
tempDlg.Width := 300;
tempDlg.StyleRenderOptions.RenderSize := False;
end;
end;

Suggestions?

John








a) I have multiple IWCGJQEdit components placed on a IWCGJQDialogEx component. The ZIndex of the IWCGJQEdits are set to a high level when the frame on which the components set is created.
b) The following code displays the is placed procedure If I
procedure TIWCGFrame_PtInfo.IWCGJQRadioButtonExNewGeneralDentistJQRadioOptionsClick(Sender: TObject; AParams: TStringList);

Re: ZIndex

PostPosted: 24 Nov 2014 18:00
by Alexander Bulei
Hi John,

If I wrap the above code inside a modal IWCGJQMessage dialog, the IWCGJQDialogEx.will still display..


What do you mean? Display on front?

and when the edit button on the navigator is pressed the edits appear enabled, i.e. dialog appears just as it does in the two images above. However, the edits are, in fact, not editable. The code with the IWCGJQMessage is shown below.


They are not clickable, because of zIndex.

Best Regards.

Re: ZIndex

PostPosted: 25 Nov 2014 07:07
by jredoc
Hello

First, the text below my name on the original post should have been deleted. Secondly, I will try to restate the problem.

a) The RadioButton.OnClick procedure that I initially presented will display the IWCGJQDialogEx as shown in image 1, and this dialog functions correctly.

b) The definition of correctly being that after depressing the navigator edit button located on the dialog, the edit buttons on the dialog will appear as shown in image 2. Also, the IWCGEdits are at that time available to receive text, if the edit receives focus by clicking on it with the mouse.

c) The problem occurs when the initial code in RadioButton.OnClick procedure is expanded to include a IWCGJQMessageDlg. This change is shown in the second instance of the procedure. Here, the original code is placed inside the "if ModalResult = mrYes" of the IWCGjQMessageDlg.

In this situation, the button.OnClick event will display the dialog just as it did in the initial procedure (image 1), and clicking on the navigator edit button will change the dialog display to look exactly as it does in image 2.

The problem is that with the second procedure, none of the IWCGJQ edits on the dialog will receive focus and text can not be entered. This change is directly related to the addition of the code dealing with the IWCGJQMessageDlg. Everything else is the same.

Does this clarify the issue? If so, are there suggestions?

TIA

John

Re: ZIndex

PostPosted: 25 Nov 2014 10:26
by Alexander Bulei
Hi John,

The simple testcase/or small video with this problem is more helpful and faster.

Can you provide something? T.I.A

Best Regards.

Re: ZIndex

PostPosted: 01 Dec 2014 14:46
by jredoc
Hello

To reproduce the problem with the attached demo

Step 1
- Start the server
- click on the accordion tab patient information
- click on the radiobutton "Enter Unlisted Dentist" to display a confirmation message.
- answer yes to the confirmation message and the IWCGJQDialog will display
- on the displayed dialog click the edit button on the navigator. The IWCGJQEdits will become enabled and text can be entered.

Step 2
- close the server
- in the IDE select the form IWCGFrame_PtInfo removed the remarked out code in the procedure IWCGJQRadioButtonExNewGeneralDentistJQRadioOptionsClick
- repeat Step 1 and note that after the edit button is depressed the IWCGJQEdits will appear as if they are enabled but they will not accept text.

Suggestions?

TIA

John

Re: ZIndex

PostPosted: 02 Dec 2014 11:33
by Alexander Bulei
Hi jredoc,

It's a not clear/simple test case (seems as whole project).
Too much code / units to clean, therefore I think, the remote support will be faster ..

Please send us the id & pw by email, when you will ready.

Best Regards.