Can i create img map and then add several click event?
for example this img-
I have 4 area for event top-left, top-right etc.
How i can do this?
I need something like tag map on HTML.
Another approach would be to set the buttonMode to true on your image, add a click handler to it, then check if the point that got clicked is in any of the particular areas you care about. Hope that helps.
You should check out flexlib. I found this via a search and the result was already in StackOverflow: Image map in Flex So technically this question is a duplicate.
Related
I need to add an icon or text inside an event, but after search for documentation, I've no idea how to do.
For explane better what I need, I've added a pic:
I can't split an event because I need the ability to move that event.
Any ideas?
I have a dialog based application. I have one static text control and a button on this, both of which I have made invisible in the beginning. I want to show both the controls on reaching a certain condition. When I click this button, again I want to make both the controls invisible.
However, I am able to show and hide the control and also captured the button click event like this:
ON_BN_CLICKED(IDC_MY_BUTTON, &MyDlg::OnBnClickedMyButton)
and defined OnBnClickedMyButton().
But when I press the button, it is not pressed and the event is also not generated.
Any suggestions?
First check if the IDC_MY_BUTTON exists and is valid.
Remember to add DECLARE_MESSAGE_MAP() at the header file.
Also check at the BEGIN_MESSAGE_MAP(MyClass,MyParentClass) if the class
and the parent class you write are right.
I hope this helps.
I think the IDC_MY_BUTTON maybe is invalid or other control has the same ID.
Well, finally I have come to know that though the button was visible but on clicking it was not taking control, hence I used BringWindowToTop() to draw it on top. Now it is being clicked and OnBnClickedMyButton() is also being called.
But now the issue is that after calling BringWindowToTop() the button is not shown. It is shown only when I take the mouse pointer on it. Not able to understand what is the issue.
As you can see,I can click the first check box(PRODUCT-323),but can't click the second.After a long
trying,I find it is because the second doesn't get scrolled to view(Is it intented by tool design or a bug?).So how to scroll this popup div to ensure the second get shown?
Actually,I have tried this,but failed
((JavascriptExecutor)driver).executeScript("document.getElementById("pupop").scrollTo(0,30)");
Can you please share which version of WebDriver are you using?
If I remember correctly, Version 2.16 or so had a known issue with locators not scrolling into view. The reason being,, they were using the position co-ordinates of the center of the element to bring focus and in this case, the center is hidden from view. This was solved in later versions.
There are a couple of approaches.
1) Try to perform some action on an Element that is completely hidden from view.This will bring the element fully into view and you will be able to access it.
In this case, try to access the checkbox in 3rd or the 4th row, you will be able to bring focus there. Then access the 2nd row.
2) Do a Driver.Manage().Window.Maximize() [This is in c#]. This will also bring the element into view.
It is a good practice to avoid a window with both scroll-bars. By maximizing it you will reduce the window for such errors.
Hope this is useful.
Did u try the keyboard options?? ctrl+ down arrow through script???
Or in the worst case use tab to focus on to that checkbox.. I works in OpenScript and RFT this way.
1) To click the second checkbox: You can use the xpath to find that element. In xpath you can easily get the table row id for each checkbox which will gets incremented in their ID.
2) To scroll you can use the below code:
JavascriptExecutor js = (JavascriptExecutor) webdriver;
js.executeScript("scroll(0,0);");
How do you force Combobox dropdowns to stay open even when other Alert boxes appear. Looking at what to subclass from mx.Combobox, there doesn't seem to be much that i can do to short of implementing an entire combobox from scratch.Thx
For that you need to create a custom ComboBox which if created in following Link. and might be this link will going to be useful to you.
Please visit this LINK
I am working on imagemap, there are points on my image, I want to mark one of point upon clicking of a button, also please give me idea how can I can control the coordinates because my image is resizeable/dynamic, every time image size will be changed.
http://img191.imageshack.us/img191/1330/imgmaps.png http://img191.imageshack.us/img191/1330/imgmaps.png
Many Thanks for any kind of help.
This seems interesting, but easily possible,
Take and imagebutton control and load your image into it, in the server side click event of it, you will get co-ordintates of the clicked point, you can simply use GDI+ library of .net framework to draw a point on your image.
I hope this helps