I have a WPF app that I try to automate using testack white and I'm pretty much stuck at the point where I cannot get any children for a Window (which is embedded in a Panel which is the main Window)
The problem I believe is not necessarily with white but how this app is built because (I'm using VisualUIAVerifyNative as inspector. I tried others as well but haven't seen any children in ControlView, ContentView or RawView):
- opening the inspector and expand the tree till that window it shows that this doesn't have any children
window_element_no_children
- however, if I use Focus Tracking/Hover on mouse feature (e.g. while pressing CTRL the inspector then gives you whatever element the mouse is hovering) then the whole subtree for this window then shows up. Unfortunately, even though I try to find the children at this point through my automation test it still returns me none.
window_element_with_children
Does anyone have any idea how exactly I can "force" a check on this window so that the children will then be displayed? Same as how FocusTracking in inspector works like.
Thanks a lot
Have you tried using AutomationElementFinder?
var children = new AutomationElementFinder(window.AutomationElement).Children(
AutomationSearchCondition.All);
You can try other SearchCondition too.
Related
using get_node("xyz").input_pickable = false usually works fine for me to (dis)able a node's collision shape.
What I'm looking for is a node I could place all over "the whole screen" and have everything below (z axis-wise) unpickable as well as everything above pickable. A scenario would be a popup-window overlapping all kinds of input-elements which shouldn't be clickable while said window is open...
Is there any way to apply such a "layer"? This would be quite convenient.
EDIT:
Obviously it works fine with normal buttons and a Panel in between. My custom-made buttons built from Node2D --> Area2D --> CollisionShape2D won't though...
Any idea why that could be? Do Panel and CollisionShape2D seem "incompatible" here somehow?
I'm working on a project that has needed a TreeView control with multiple columns. After research looked like a custom control was necessary, and to my luck I found a good one on CodeProject: https://www.codeproject.com/Articles/26849/The-TreeListView-To-End-All-TreeListViews
I've been leaning on this control heavily but have run into a few bugs that have been very challenging to work around given that I can't actually access the source code in the project files the developer was kind enough to share. The main issue I'm dealing with is a crash that pops up when the control is resized almost to the point to where a horizontal scrollbar would need to appear. I noticed that when resizing there is a deadzone of about 10 pixels where this control would show the horizontal scrollbar slightly before you'd need to, likely because of weirdness in measuring the indenting widths of child tree nodes. In this state the scrollbar appears, the scroll box fills the entire bar and won't allow you to scroll left or right.
This doesn't bother me other than the fact that if you use your mouse scroll wheel in this state it throws an ArgumentOutOfRange exception and pulls my application down:
Value of '-1' is not valid for 'Value'. 'Value' should be between
'minimum' and 'maximum'.
I'd love to be able to handle this exception but I'm quite new to VB.NET and Windows Forms and am still learning how events are handled. If there is a straightforward way to override the OnMouseWheel event or otherwise handle errors that may be triggered from it that would be fantastic. That or any other suggestions the community may have would be greatly appreciated.
If helpful, here is the top part of the error's StackTrace:
System.Windows.Forms.ScrollBar.set_Value(Int32 value)
WinControls.ListView.ContainerListView.OnMouseWheel(MouseEventArgs e)
The ListTreeView control (one I'm using) inherits from ContainerListView. ContainerListView's OnMouseWheel event is protected. Does this mean that I won't be able to override it?
Thanks, and happy to provide any other information that is needed.
I am new to the cocoa mac development, Right now i am developing a mac app having several server hit after a particular time. If the hit gets desired data then I need to to show the equivalent window and to show the window i am using [myWindow showWindow:self] method. It shows desired window and set the key window to my visible window is that myWindow.
Each and everything is fine till now but the problem is that suppose when a user start working on any window and open several other child window then unfortunately my show window get called and the focus of my working window transferred to other window.
After several searches i found that i can get the focused window by accessing the [[NSApplication sharedApplication]keyWindow]delegate], I applied several condition that when my this and this window is on key window then don't hit server.
But the problem is not get solved. Now i think setting a keyWindow to my current working window will be best option.
Please suggest me what can i do and how i can forcefully set a window as my key window.
Any Help would be appreciated.
Thanks In advance.
If I understand your question correctly you wish to bring a window forward if it receives input from your server but without moving it in front of the current main or key windows.
The method you are using, showWindow:, belongs to NSWindowController and both shows a window and makes it key.
What you need to look at are the NSWindow methods for managing the window levels, orderFront: et al.
In particular you might want to use orderWindow:relativeTo: which allows to place a window in front/behind another window. For example:
[<window> orderWindow:NSWindowBelow
relativeTo:NSApp.keyWindow.windowNumber];
will move a window to be immediately behind the current key window, and in front of any other windows behind the key window.
HTH
Is there a reason / fix for this weird designer issue (at least, I think it's related to the designer), whereby the controls on the form do not appear as they do in the design window when I debug the application..!
Please see the following two screenshots to demonstrate the problem (note: I have blacked out some of the content of the form, this is not the problem):
Picture 1: Showing how the form appears in the designer view
Picture 2: Showing how the form appears in debug mode
You can clearly see that some of the buttons have moved position on the form.
Note: At first glance, this may appear like a duplicate of: Windows Forms Designer destroys form layout. However, I have not installed any additional tools or components. This is simply a standard "vanilla" build of Visual Studio 2012 on Windows 7 32-bit.
I've also come across this question: UI Controls Overlapping & Fonts Issue in Windows Forms Application. However, I am not using "large fonts", nor am I using any non-standard fonts on my controls (all label and button text is left as default). Still, I can see how this would affect the control positions and will do some more checks in this area.
There's nothing happening within the form's Load method.
I'm also using TFS 2012.
What could be causing this? Is there anything I can do to fix it?
EDIT: I've removed the font property for each label and button control, allowing the system to set the default value. Still no change. Interestingly, if I open the form in design mode, then save it, then close it, then open it again, the buttons have moved... If I do this a few times, the buttons migrate until they're off the form.
OK, I've found the answer, after a bit more fiddling. It seems to be related to the Anchor property on the controls. I made a bunch of changes, testing between each change to see if there was any difference. When I selected all the controls and set the Anchor property to Top, Left, this solved the issue.
I hope this helps someone else at some point!
I am using (a school modified version of) the "Squeak By Example" (SBE) image for a OOP/OOD class. However, my System Browser is missing a few features that appear in SBE. I assume there are some configuration options that can get them back for me, but I can't find them yet.
My questions are:
1) How do I get the buttons back? In the bottom pane there should be a bunch of button (browse, senders, implementors, versions, ..., source). My buttons are missing.
2) How do I get the small workspace area above the buttons to appear? There is supposed to be an area that I can type in, below the top panes, and above the buttons, but it doesn't appear.
Thanks in advance!
Robert
Edit - I did fool around in the Preferences Browser and tried a lot of settings. I managed to make the buttons come back and then later got that small (unknown name) workspace pane back, but I have no idea how. I have tried to systematically turn stuff off again to find out what setting(s) controlled what, but I was unable to determine what controlled either problem. So even though I have it working, I would like some squeak/smalltalk knowledgeable person to let me know how to control these as it might help me learn...
"In the bottom pane there should be a bunch of button (browse, senders, implementors, versions, ..., source). " -- switch on the optionalButtons preference in the preferences browser.
The "area that I can type in, below the top panes, and above the buttons, but it doesn't appear" sounds like the annotation pane - this gives you summary information about the method you're currently viewing, and it's controlled by the annotationPanes preference. Alternatively you may be referring to the Mercury Panel which is used for fast navigation to other classes and methods; this is (of course :-) controlled by the mercuryPanel preference.
If you've been messing around, you may also find that you now have an incorrect system browser selected. Squeak has a choice of browsers which can act as the System Browser. You can choose between them by clicking the menu button on the System Browser and selecting "Choose new default Browser". Open a new browser window to see what effect this has had.
You may also want to try a Pharo image which has everything configured the way you want by default.
Do you have access to the Preferences Browser? It should be in the main system menu. You can alter all sorts of things via this browser, including which buttons appear in teh system browser?