My goal is to make two successive calls to ShowMetroDialogAsync to display a custom input dialog box followed by a custom message box.
First this call
_dialogCoordinator.ShowMetroDialogAsync(this, _inputDialogView);
followed by
_dialogCoordinator.ShowMetroDialogAsync(this, _messageDialogView);
However instead of the input dialog getting shown first, the message dialog gets shown and the order seems random when I execute the Command consecutively, i.e. sometimes the input dialog gets displayed followed by the message dialog and vice versa.
Am I doing anything wrong?
Many thanks in advance.
Related
I am building a MATLAB app using app designer and I have a textArea component which I use to display output message to the user using the app. The component name is OutputStatusTextArea_1 and i set the value of nb_Text to 0 in the startup function.
Whenever I need to display a message I use the following command:
app.nb_Text = app.nb_Text + 1;
app.OutputStatusTextArea_1.Value(app.nb_Text) = strcat({'# '},'New Message')
What happened is at some point the number of message fill completely the text area and then everytime i add a message, the user needs to scroll down to see it.
What I would like is to be able to always display the last message at the bottom of the TextArea and that the user needs to scroll up if he wants to see old message. Is there a way to do so?
have you tried the setCaretPosition function? see this post
https://www.mathworks.com/matlabcentral/answers/255486-set-edit-uicontrol-to-last-line
I have an issue with setting value of AutomationElement by using method ValuePattern.SetValue().
Everything works just fine until some dialog appears. When the dialog appears the code execution got stuck. No exception is thrown. After the dialog is confirmed, the code exection continues. Bellow is a sample of the code:
BasePattern basePattern = null;
ValuePattern valuePattern = null;
AutomationElement elementA = Window.GetElement(SearchCriteria.ByText(propertyName));
object patternObjectA = null;
elementA.TryGetCurrentPattern(ValuePattern.Pattern, out patternObjectA);
basePattern = (BasePattern)patternObjectA;
valuePattern = (ValuePattern)patternObjectA;
valuePattern.SetValue(optionToSet);
// Window.GetElement() is a method from TestStack.White framework
// The code execution got stuck on the last line until the dialog is confirmed
Is there any other way to set AutomationElement value?
Is somehow possible to avoid of getting stuck by dialog?
I'll by grateful for any help.
Thanks advance.
It could be that this dialog is not supporting UI Automation correctly or that you simply target the wrong element.
To verify that you may use Inspect.exe from Microsoft or similiar tools.
If it works, check if you really target the correct component with your code again.
If it does not work and:
if you are able to change the application
you can change the so called AutomationPeer of the UI component - here is a link for more infos
Or simply use another UI component that supports UI Automation correctly.
if you are not able to change the application, and also do not need to run in background, parallel, etc.. you might just focus the component (call setFocus() onto the AutomationElement, or expand it (via IsExpandCollapsePatternAvailable or simulated MouseClick onto the components coordinates)) and then use the SendKeys.SendWait("test") method.
EDIT: There is one more thing you should have a look at, and I wonder why I didn't mentioned it in the first place: Register to UI Automation Events
For example you could register a callback for the Structure change event type, and check if the dialog you talk about appeared.
If so --> click the confirmed button of the dialog.
Probably you will have to synchronize your execution, so that every further action in the UI Automation script waits until the registered callback got executed and the confirmed button got clicked.
I would like to display some information to the user via Matlab App Designer's GUI. I am new to this program and can't seem to find a widget that provides what I feel should be a simple function. Am I missing something? Examples would include showing the user:
The path of the file that he/she selected
Errors such as "No files detected" that are printed in a Matlab script called on by the GUI code.
Other print statements in code such as "Done!", etc that will inform the user when a process is complete.
Is there a way to capture the output in the Matlab command line and report these in a window of some sort in the GUI? Thanks in advance!
You can use a TextArea to display information for the user. Here's how I made a simple example:
Drag a button to the app in design view.
Drag in a text area also. I changed the label to Feedback.
Select the button and use the Callbacks tab in the bottom right of app designer to add a callback with the default name it gives you.
Edit the callback to contain
answer = 'what your want to display';
app.FeedbackTextArea.Value = answer;
When you push the button the text area gets filled. In your code, instead of just setting 'answer' to some string, set a variable using whatever code is dealing with your user's information. The key is to store what you want the user to see in a variable and then assign that to the "Value" parameter of the text area or other widget where you want them to see the results.
I have a messagebox in the ZK Framework that pops up when the user enters invalid input. It behaves as expected. We are trying to make JAWS and other screenreaders read the text of the box when it pops up.
{
Messagebox
.show("Verify that the correct Employee ID Number and/or last four of SSN were entered", "Error", Messagebox.OK, Messagebox.ERROR, -1);
}
The -1 at the end is to set the focus:
http://www.zkoss.org/javadoc/7.0.2/zk/org/zkoss/zul/Messagebox.html#show(int, int, int, java.lang.String, int)
but it sets the focus to the button itself, I've tried numbers ranging from -5 to 5 hoping it would use the button as a starting point, but that does not work. The screenreader will read the message if you use the mouse to click on it, so I know it's possible for the text to be read, but the requirement is that it's automatically read when it pops up.
Does anyone know of a way to make this happen?
Instead of using the built-in ZK MessageBox functionality, you can use the org.zkoss.zk.ui.util.Clients.evalJavaScript() function to call a JavaScript alert. This will bring focus to the popup. Although it will not be in a pretty ZK window, screen readers should read it.
Here's an example:
org.zkoss.zk.ui.util.Clients.evalJavaScript("alert('This is a popup message')");
Ok so I created a Drill down Report (lets call it DrillONE) which uses a hyperlink to drill down to a other report (lets call it DrillTWO)
the drill down report (DrillTWO) doesn't have Input controls because it gets all its info from the report that is calling it (DrillONE)
So the hyperlink to DrillTWO looks something like this
"./flow.html?_flowId=viewReportFlow&reportUnit=
%2FNWU%2FStudentInformation%2FAcademicProgramDevelopment%2FAPQIBI005drill
&startDate=" + new SimpleDateFormat("yyyy/MM/dd").format($P{startDate})"
Now my problem comes when Going back from DrillTWO to DrillONE (Without having to enter the input controles again and clicking RUN)
What happens is When I click the hyperlink back to DrillONE it sends the parameters and everything along fine, but it loads the input control screen and then the user has to run the report
I want it to go directly to DrillONE and run it, (Skip the input controle screen)
Is DrillONE set to always prompt for input controls? Turn this off.