Hello
Anyone know if it is possible to to show a screen as a dialog instead of new screen? Like with the windows form class .ShowDialog? Also, if it is possible, how to set Dialog Result for buttons?
Show dialog
Re: Show dialog
Can You clarify, what is the "discussion" with HMI about? Simple, which screen to open, or something else?
-
- Posts: 137
- Joined: Mon Jun 11, 2012 2:10 pm
Re: Show dialog
To make a screen be a dialog instead of a window, under the General properties ribbon, select Popup and Modal (to have window just be like tool window, do not select Modal).
To pass Dialog results you can use a tag or something likeI will note, I've never tried to show a screen by directly using ShowDialog so I'm not 100% sure what to expect.
To get a button to return a dialog result of OK, add the following code to the button's click eventThis will also close the dialog window.
To pass Dialog results you can use a tag or something like
Code: Select all
result = ((System.Windows.Forms.Form)(Globals.ScreenName)).ShowDialog();
To get a button to return a dialog result of OK, add the following code to the button's click event
Code: Select all
DialogResult = DialogResult.OK;
Adam M.
Controls Engineer
FlexEnergy
Controls Engineer
FlexEnergy
-
- Posts: 18
- Joined: Sun May 31, 2015 2:38 am
Re: Show dialog
AMitchneck, I've tried your solution, but it ends up with a conversion fault when casting the object ScreenWindowsAdapter to a Forms.Form object.
-
- Posts: 137
- Joined: Mon Jun 11, 2012 2:10 pm
Re: Show dialog
Claus,
As I mentioned, I've never tried to call the ShowDialog method directly. What I do is set the dialog screen general settings to popup and modal. This makes the iX's show function work like the ShowDialog function, but without the result. To pass a result, I set a tag within the dialog.
As I mentioned, I've never tried to call the ShowDialog method directly. What I do is set the dialog screen general settings to popup and modal. This makes the iX's show function work like the ShowDialog function, but without the result. To pass a result, I set a tag within the dialog.
Adam M.
Controls Engineer
FlexEnergy
Controls Engineer
FlexEnergy