I have encountered a problem in a Flex application.
I have implemented drag and drop support from a List to a Canvas, and I DragManagers doDrag() - with.a proxy-image. In my custom DragDrop event handler, i place a new item on the Canvas. I use the event.localX/localY to position the new item.
It is working ok, but the problem is that I want the "new" image to appear exactly where the proxy-image is when i release the mouse button (x/y -wise).
Can I somehow get the proxys X,Y location. I thought that DragManager would have a reference to it but I can´t find it.
Thanks
/C
Even though I save a ref to the proxy-object, it´s values are reset (naturally) in the drag-drop method.
I have found the answer by using the event.localX/Y variables.
Related
I have been using the Karate framework Robot component for desktop UI automation. With it, I need to click on a button in each row item of a data grid and using click() doesn't work when the item is not in view/is offscreen. As such I'm trying to figure out how to scroll down to the items I need so I can click the button. I noticed with the driver there is an option to scroll() but I haven't been able to find one with Robot.
Is there a workaround for this or are there plans to add a scroll() function for karate-robot in the future?
Scroll certainly sounds like it may be missing from the existing API. Please do consider investigating and contributing to the code, which will just make it faster to release.
Meanwhile here are the possible workarounds:
see if using the TAB key auto-scrolls to the element
if you get a reference to the button you can call invoke() on it which is supported by a range of windows components
P.S. please do consider contributing code, the code base is actually quite simple. And here is where you can implement the Scroll pattern: link.
I am trying to conditionally render an input bar that appears above the keyboard when the user is tying. I do not want to show this input bar unless the user wants to add something. So they tap a button which is supposed to make the component visible and then focus on the input which brings up the keyboard.
This works as expected except when the user first opens the keyboard. Nothing appears. There is an empty view tag as the keyboard comes up but then it disappears and there is nothing. However, once the user starts typing it appears and after that works as expected. I have no idea why it isn’t appearing. If I don’t type anything and dismiss the keyboard you can see it briefly before it goes away as it is supposed to.
I have tried calling the function with async-await and my current syntax. Neither is working and I have been unable to solve this.
Here is a snack that recreates the issue and contains all the relevant code to reproduce the error.
https://snack.expo.io/#dmargulies/inputaccessoryview-problem
Thank you for your help.
First of all InputAccessoryView exists only on IOS.
I changed conditional rendering flow.
Look at: https://snack.expo.io/#djalik/inputaccessoryview-problem
For anyone looking for a cross-platform solution, there is a package:
react-native-keyboard-accessory
Note: I'm not the author, just figured it might help some peeps.
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.
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!
JavaFX 1.x had a blockinMouse property you could set to stop events propagating down to nodes below (for instance a right click to bring up a context menu when you'd just want it on the top node.)
I'm struggling to find an equivalent in JavaFX 2 though, I'm assuming it must be somewhere but the only things I've dug up online have been similar complaints, and I'd like to avoid the brute force style answer that's listed there.
Seems I was approaching this the wrong way - the solution was to simply call consume(); on the event in the top most node to stop the event propagating down to the lower nodes. The mouseTransparent property was similar but not what I was after, it just controls whether the node receives mouse events or just passes them on (similar to the old glasspane like approaches.)
In JavaFX 2 this is called: pointerTransparent.