I am creating an interactive World Map, where you can hover over different countries to see which one you are hovering over, and click them to link to a seperate HTML page with info on them. The problem is, when I hover over smaller countries like Switzerland, the tooltip itself covers the entire hitbox of the country, and I am not able to click on it.
I have already asked about moving the Tooltip elsewhere, or providing a link on the tooltip itself, but got no answers for those questions. So now I am asking; is it possible to completely hide a tooltip in pygal maps? Or perhaps change it to a toggle that activates on click? Or perhaps even render the tooltip relative to the cursor instead of relative to the Datapoint itself? My code is so close to being finished but is being held back by this rather infuriating issue.
Please let me know if I should also provide my code that I have for this issue.
Related
So this is a bit of a tricky situation. Using Three.js/ReactJS and canvas.
Scenario: When I click and drag a sphere beyond its boundaries a tooltip will show a warning message over the mouse pointer. When I release the mouse the tooltip will disappear. When I click and drag the sphere back to a position inside the boundaries, the tooltip will not be displayed once inside the boundaries.
Bear in mind this is tied into the state of the app handled by react, and in this instance the tooltip is being updated when the conditions are met and updated in the state.
The tooltip element is present however, the attributes and content gets updated on a click and hold when the sphere is out of bounds...
using
ActionChains(page.driver).move_to_element_with_offset(sphere_order_panel, -1047, 398).click_and_hold().move_to_element_with_offset(sphere_order_panel, -1633, 265).click_and_hold().perform()
clicks on the element and drags it to the position outside of its boundaries, but the tooltip is NOT updated... i've put a breakpoint on the page once i manually click into the page, my sphere gets snapped to my mouse location (meaning click_and_hold is indeed working... but i check the html and verify that the tooltip is not updated. however if i manually use my mouse and click on the sphere the tooltip will update! is selenium automation not executing the click_and_hold correctly? I don't think this is the case.
Is there a way to add the mouse pointer to the page using selenium?
Or is there a way to use execute_script() to use javascript on the page to satisfy my conditions to get the tooltip to be updated?
I'm really stuck on this.. and this is a tricky situation (for me at least)
Any help greatly appreciated.
to get around my issue, I had to do this
chain = ActionChains(page.driver).move_to_element_with_offset(sphere_order_panel, -1047, 398).click_and_hold()
chain = chain.move_to_element_with_offset(sphere_order_panel, -1047, 398)
chain.perform()
I have the task to build up an interactive plot which i have already done more or less. But now I am supposed to give specific information about a point in a graph for example P(8|6) and by clicking on this point there should open a new window with specific information. Adding the information to the window wont be the problem but the window itself. How I can open a window by clicking on this specific point (keep in mind, it is no button since it changes from graph to graph)?
The answer is qwt! Study the documentation and examples for that project like your life depended on it, and you will find exactly what you need.
I wrote up a pretty complete example a year or so ago; but it is in C++; converting it to python should be pretty straight forward.
https://github.com/peteristhegreat/qwt_generic
Hope that helps.
PyCharm displays little bars on the scroll bar for things like code warnings. This feature is called "inspection".
If you move the mouse cursor over a bar, it shows a preview of the code annotated with the inspection.
I find this really fiddly, and I'd actually like full inspection notices to be displayed all the time in the normal editor, just like it appears in the small preview.
Is there any way I can achieve this?
Using the default keymap, you can use F2 to jump to the next highlighted error and then Ctrl+F1 to show the tooltip.
According to this PyCharm's documentation there seems to be an Inspection Tool Window which displays inspection results on separate tabs..
You can access the tool window through menu Code | Inspect Code.
I just tried it and it showed a tab like this:
Press Alt+6
Or, click "Problems" on the bottom-left
Or click the error icons at the top-right of the text editor.
This gives a list of problems for the file open in the currently active tab. It automatically updates when you change tabs:
I have created a Contact Map using matplotlib in wxpython, now what i want to do is set up a 'connection' with pyMOL. i want my program to be like CM-View where when you hover over points on the contact map, it shows the 2 contacts on PyMOL showing a line between them. Also things like, telling pyMOL to only select 1 chain.
So basically I want to send data from my GUI to pyMOL to make it do something, like the hovering over the contacts or telling pyMOL to do something.
If you are not Venkatramanan Krishnamani, you may want to have a look of his code for a PyMOL extension CMPyMOL.
Hey, his extension/plugin is also for visualizing contact map!
In his plugin, the residues are not highlighted upon mouse hovering over contact map, rather mouse clicking on contact map. But that's close enough to what you want, I guess.
I would like to implement a swipe or flipper view (widget) using PyGtk for my Quickly app. There should be a titlebar that contains the title of the currently showed content and the titles of the previous and next entry. To navigate threw the different entries you should be able to click the titles or swipe from left to right or vice versa.
But I do not know where to start.
Which Widget should I extend?
Would the Notebook widget the right choice?
How could I change the style of a Widget?
How do I implement the flip effect?
Do I have to combine different views (widgets) for the content pane and the titlebar?
For a better understanding of my problem view the screenshot below.
Thanks and best regards
Andreas
You might want to take a look at Clutter. Though I think, this kind of UI-Design could be very unintuitive on a desktop machine.