Software Archive
Read-only legacy content
17061 Discussions

Gui calls other GUI

hbe12
Beginner
578 Views
Can someone kindly help me with coding this? I have a GUI that open a file and read data from this file. then in this GUI there are three buttons, Add, Delete and Edit , When I click on edit another GUI show up which to edit some data, after I finish with the second GUI and clicking Ok, I am suppose to return to the first GUI, but the first is not showing up?

I would appreciate if you show me how to call a second GUI and keeping the first one visible as soon as finishing with GUI2.

Thanks in advance
0 Kudos
1 Reply
Jugoslav_Dujic
Valued Contributor II
578 Views
When I click on edit another GUI show up which to edit some data, after I finish with the second GUI


What do you mean a GUI? A dialog? If so, my guess is that you're reusing your DIALOG variable for two dialogs, i.e. that you have something like:
 
SUBROUTINE OnButtonEdit(Dlg, ID, iEvent) 
USE DFLOGM 
TYPE(DIALOG):: Dlg 
iStatus = DlgInit(IDD_CHILD_EDIT, Dlg) 
... 
iStatus = DlgModal(Dlg) 

If that's the case -- you mustn't do that. Variable Dlg you get through arg-list refers to the parent dialog and you're corrupting it. You have to declare another variable of type DIALOG and use that.

Jugoslav
0 Kudos
Reply