I have a problem trying to click a button (which is not actually a button control) in a ClickOnce application I'm automating. It's located in "ViewManager1 pane" according to Inspect.exe, but there are no children of this pane and no controls. Looks like this:
The only thing I've been able to come up with is using the pywinauto.mouse.click function with coords. However, I don't always know the size of the window. I can maximize the window and click it, but I would like to be able to find the coords regardless of the window size. The problem is the button I want (Active Directory) may be left of center or right of center depending on the window's size.
More acceptable would be to resize the window (instead of maximize) and then click the coords, but I can't figure out how to resize it. The window's actions from Inspect.exe are as follows:
Window.SetVisualState only allows Minimize, Maximize, or Normal. I thought about calling .rectangle.mid_point() to get the center coords of the pane, but I don't know how to find the button from there since it moves based on window's size.
Is there any way that I can find the coords of the Active Directory button, or alternatively resize the window?
Related
I'm implementing a screenshotting app that captures a portion of the screen. I'm currently:
listening for a keyboard shortcut
drawing a transparent view on top of the entire screen
having the user click and drag to select an area inside of that view
screenshotting the coordinates inside of that bounding area.
Here's an example of what it looks like (the transparent view is tinted blue):
This works, but it causes the mouse to stop focusing on whatever it was previously focusing on. In other words, if I'm hovering over a tooltip and I hit the screenshot shortcut, the tooltip vanishes before I have a chance to screenshot it.
It looks like macOS's own screenshot command does not have this problem. If I hover over a date in StackOverflow in order to see the time tooltip, I can press Cmd+Shift+4 and screenshot it pretty easily:
If I try and do the same thing with my own code, the tooltip vanishes after I render my transparent view, even if I haven't moved my mouse.
Is Apple doing something specific to maintain the focus state of the mouse that I could be doing? Alternatively, should I somehow take advantage of Apple's own screenshotting flow myself inside of this app? If it helps, I'm currently using CGWindowListCreateImage to actually take the screenshot.
There is a small window application (50x50px) with only one image inside of it. When you click the image, a popover(GtkPopover) appears, but it cannot overpass the window borders and only part of it is shown.
How could I solve this issue without resizing the window?
Popovers in GTK under X11 cannot extend outside of the top-level window they belong to, because they do not use a separate windowing system surface; if they did, like menus, they would not be able to remain open even when clicking outside of them.
This cannot be fixed in GTK3, see:
https://bugzilla.gnome.org/show_bug.cgi?id=747509
https://gitlab.gnome.org/GNOME/gtk/issues/543
You must use Wayland, or you must ensure that your window is big enough to display your popover.
You also probably want to use gtk_popover_set_position(), gtk_popover_set_pointing_to(), or gtk_popover_set_constrain_to() to ensure that your popover always opens within the window surface, instead of outside.
Suppose I wish to focus on the state of Colorado in the following chloropeth map:
The typical mechanism is to use the operating-system dependent means of dragging the picture. I am on OS/X so that involves using two fingers to drag the image to the desired new centering location.
However the actual result of that operation is a bounding box is displayed on the image (I can not get a screenshot of it since it disappears)
So then .. how to drag /re-center the Tableau display?
Click onto the small 'play' arrow button on the chart menu in the top left hand corner. A sub menu will pop up where you can select the scroll method you'd like - click and drag is one of these. You can also disable this through the chart options (the small drop down menu on the top right hand corner of the chart).
I have some nodes in the content of a scrollPane.
With nodes mouse pressing , a popup is shown and is positioned in the required X and Y.
Well , when scrolling , the popup is always fixed , as it is positioned according to the scene.
Is it possible to show the popup inside the scrollPane , so when scrolling , the popup scrolls too .
Yes, it is possible for the pop-up location to track the scroll position of the scroll pane. I am not going to write the code for that here.
One consideration you will have is what to do with the pop-up if the user scrolls such that the pop-up ends up outside the visible region of the scroll pane (I'm guessing the pop-up would then be hidden and cease tracking the scroll pane location).
Do consider your design and decide if you really need a pop-up or not, or if you can just place a node in the group that maintains the content for the scroll pane. Because, if you did that rather than using a pop-up, then the scroll pane would automatically scroll the node in the group as it scrolled around the group.
Well, I make a Pane based on an example of JavaFX samples (Display Shelf), I put Panes with Labels, Buttons, ComboBox, TableView where's the ImageView. It is working, when I click on Pane, it does the animation correctly, but the buttons that I put in vertical on Right of Pane, receive the focus out of where they are. When I move the mouse button, nothing happens, but if I move the mouse to down of it, I can click in the button that so reveice the focus. The local where I have to move the mouse to button to receive the focus is increasingly far (down) if the button is below the other.
I'm using the Perspective Transform of JavaEX and all is in JavaFX Samples, just changed some params of size (width and height). This effect may be interfering in focus? Or can be another problem? If anyone already had this problem please help me. Thanks.