CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

ZIndex

by jredoc » 22 Nov 2014 18:49

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);
You do not have the required permissions to view the files attached to this post.
jredoc
 
Posts: 125
Joined: 11 Jun 2013 03:34

by Alexander Bulei » 24 Nov 2014 18:00

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.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by jredoc » 25 Nov 2014 07:07

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
jredoc
 
Posts: 125
Joined: 11 Jun 2013 03:34

by Alexander Bulei » 25 Nov 2014 10:26

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.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by jredoc » 01 Dec 2014 14:46

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
You do not have the required permissions to view the files attached to this post.
jredoc
 
Posts: 125
Joined: 11 Jun 2013 03:34

by Alexander Bulei » 02 Dec 2014 11:33

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.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal


Return to IWCGJQMessageDlg

Who is online

Users browsing this forum: No registered users and 4 guests

Contact Us.