Questions tagged [mouseclick-event]

An event that is triggered when a Mouse input device is clicked

A MouseClickEvent is an event that is triggered when a button on a Mouse input device is clicked. The event contains information such as the particular button that was clicked, the length of time that the button was pressed, and how many times the button was clicked (single-click, double-click, etc)

632 questions
5
votes
2 answers

Draw a Polygon using Mouse Points in C#

I need to be able to draw a polygon using mouse click locations. Here is my current code: //the drawshape varible is called when a button is pressed to select use of this tool if (DrawShape == 4) { …
Chris Bacon
  • 995
  • 8
  • 30
  • 42
5
votes
0 answers

Bokeh: Passing a variable to a url on MouseClick - OpenURL vs. CustomJS

I have a Bokeh graph with some points in it and I'm trying to catch a variable belonging to any point on MouseClick. Code examples are below this text. Using the OpenURL method everything works as expected. The value of variable @ref is put into the…
Patrick
  • 51
  • 2
5
votes
1 answer

How to update Javascript global var inside a click event function

Using Javascript & jQuery, I'm trying to get the mouse coordinates of a click event to use in other Javascript functions. My problem is that global variables set within an event function do not seem to update outside the function, like global vars…
4
votes
2 answers

What could cause mouse clicks sent by PostMessage to be ignored?

I was looking for a way to send mouse clicks to a background application on Windows (ie. by handle), The test window I used to confirm my code was working accepts and processes the clicks, but my target application does not (even though Spy++ shows…
mina
  • 439
  • 2
  • 7
  • 13
4
votes
2 answers

setTimeout and clearTimeout in React

I'm struggling with creating a logout feature when users don't make any click event for 30 seconds on the page using setTimeout and clearTimeout. But every time the users click anything on the page, the remaining time must be reset to 30 seconds…
4
votes
1 answer

jQuery; Parallax page - Get the click event go through DIV layers

DEMO The idea now is to (instead of transp. .png images) fill the layers with standard HTML elements, like making a nice moving 2d-3d page. You can guess my first problem. Whatever I tried I cannot make the click event go through the 100x100% div…
Roko C. Buljan
  • 196,159
  • 39
  • 305
  • 313
4
votes
1 answer

Handling onClick and onKeyPressDown in the same function React

In React, I have a div that when clicked with a mouse, or tabbed and pressed enter or space upon, activates (it uses both onClick and onKeyPressDown to trigger the same function). However, I'm not sure how I can only account for mouse click events…
Dog
  • 2,726
  • 7
  • 29
  • 66
4
votes
1 answer

Angular Material md-select load options in async way

I need to load select's options asynchronously ( through a service), using the Angular Material md-select component. Actually, I use a click event to load data. It works but I need to click the select twice to show the options. That it's a…
4
votes
2 answers

C#, mouseClickEvent doesn't respond to right mouse click

on click event doesn't respond to right mouse click. The event is for a richTextBox. when I try the same code on the form it works fine. what could be the problem? EDIT: I use winforms
Alex K
  • 5,092
  • 15
  • 50
  • 77
4
votes
1 answer

Click in Canvas is three pixels off

I've spent the whole day trying to get a click over my canvas to return the pixel xy offset. What a mission this has been! This is what I've ended up with: JS…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/html" class="post-tag grid--cell" title="show questions tagged 'html'" rel="tag">html</a> <a href="../../questions/tagged/html5-canvas" class="post-tag grid--cell" title="show questions tagged 'html5-canvas'" rel="tag">html5-canvas</a> <a href="../../questions/tagged/coordinates" class="post-tag grid--cell" title="show questions tagged 'coordinates'" rel="tag">coordinates</a> <a href="../../questions/tagged/mouseclick-event" class="post-tag grid--cell" title="show questions tagged 'mouseclick-event'" rel="tag">mouseclick-event</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Apr 13 '15 at 14:30">asked Apr 13 '15 at 14:30</time> <a href="../../users/435129/p-i" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/435129.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="P i" /> </a> <div class="s-user-card--info"> <a href="../../users/435129/p-i" class="s-user-card--link">P i</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">29,020</li> <li class="s-award-bling s-award-bling__gold" title="36 gold badges">36</li> <li class="s-award-bling s-award-bling__silver" title="159 silver badges">159</li> <li class="s-award-bling s-award-bling__bronze" title="267 bronze badges">267</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-1754908"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>4</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>4</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/1754908/in-wpf-c-how-can-i-check-if-the-center-button-is-clicked-or-released" class="question-hyperlink">In WPF / C#, how can I check if the center button is clicked or released?</a></h3> <div class="excerpt">In WPF / C#, there are events on MouseRightButtonDown and MouseLeftButtonDown, but what about the center mouse button? Is the Center Mouse button down/up e.g. events in WPF forgotten? How can I check if the center button is clicked or released? </div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/c#" class="post-tag grid--cell" title="show questions tagged 'c#'" rel="tag">c#</a> <a href="../../questions/tagged/wpf" class="post-tag grid--cell" title="show questions tagged 'wpf'" rel="tag">wpf</a> <a href="../../questions/tagged/mouseclick-event" class="post-tag grid--cell" title="show questions tagged 'mouseclick-event'" rel="tag">mouseclick-event</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Nov 18 '09 at 10:07">asked Nov 18 '09 at 10:07</time> <a href="../../users/171395/code-zoop" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/171395.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="code-zoop" /> </a> <div class="s-user-card--info"> <a href="../../users/171395/code-zoop" class="s-user-card--link">code-zoop</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">7,312</li> <li class="s-award-bling s-award-bling__gold" title="8 gold badges">8</li> <li class="s-award-bling s-award-bling__silver" title="47 silver badges">47</li> <li class="s-award-bling s-award-bling__bronze" title="56 bronze badges">56</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-16636250"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>4</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/16636250/python-pygame-how-do-i-know-if-a-mouse-clicked-on-an-image" class="question-hyperlink">PYTHON- PYGAME: How do I know if a mouse clicked on an image?</a></h3> <div class="excerpt">I'm making a basic level game where if i click a card, a picture will show. The pictures are randomly chosen. and so far, I have assigned random pictures to a card and the cards are shown face down. So if i click the card, i want the assigned…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/python" class="post-tag grid--cell" title="show questions tagged 'python'" rel="tag">python</a> <a href="../../questions/tagged/pygame" class="post-tag grid--cell" title="show questions tagged 'pygame'" rel="tag">pygame</a> <a href="../../questions/tagged/mouseclick-event" class="post-tag grid--cell" title="show questions tagged 'mouseclick-event'" rel="tag">mouseclick-event</a> <a href="../../questions/tagged/mouse-coordinates" class="post-tag grid--cell" title="show questions tagged 'mouse-coordinates'" rel="tag">mouse-coordinates</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked May 19 '13 at 15:23">asked May 19 '13 at 15:23</time> <a href="../../users/2399147/maia-f" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/2399147.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Maia F." /> </a> <div class="s-user-card--info"> <a href="../../users/2399147/maia-f" class="s-user-card--link">Maia F.</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">41</li> <li class="s-award-bling s-award-bling__gold" title="1 gold badge">1</li> <li class="s-award-bling s-award-bling__silver" title="1 silver badge">1</li> <li class="s-award-bling s-award-bling__bronze" title="2 bronze badge">2</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-12739979"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>4</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>4</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/12739979/add-mouseclick-event-to-panel" class="question-hyperlink">add mouseclick event to panel</a></h3> <div class="excerpt">I want to assign mouseclick event to asp.net panel: protected void Page_Load(object sender, EventArgs e) { Panel p = new Panel(); p.Click += new EventHandler(b_Click);//but, this doesn't compiles correctly } protected void b_Click(object…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/c#" class="post-tag grid--cell" title="show questions tagged 'c#'" rel="tag">c#</a> <a href="../../questions/tagged/asp.net" class="post-tag grid--cell" title="show questions tagged 'asp.net'" rel="tag">asp.net</a> <a href="../../questions/tagged/panel" class="post-tag grid--cell" title="show questions tagged 'panel'" rel="tag">panel</a> <a href="../../questions/tagged/mouseclick-event" class="post-tag grid--cell" title="show questions tagged 'mouseclick-event'" rel="tag">mouseclick-event</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Oct 05 '12 at 05:22">asked Oct 05 '12 at 05:22</time> <a href="../../users/1357764/nurlan" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/1357764.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Nurlan" /> </a> <div class="s-user-card--info"> <a href="../../users/1357764/nurlan" class="s-user-card--link">Nurlan</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">2,860</li> <li class="s-award-bling s-award-bling__gold" title="19 gold badges">19</li> <li class="s-award-bling s-award-bling__silver" title="47 silver badges">47</li> <li class="s-award-bling s-award-bling__bronze" title="64 bronze badges">64</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-8911196"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>3</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/8911196/javafx-2-mouseclicked-event-is-not-generated-as-it-should-as-in-java" class="question-hyperlink">JavaFX 2 MouseClicked event is not generated as it should (as in JAVA)</a></h3> <div class="excerpt">In the following code I demonstrate a difference between the java and javaFX2 as far as it concerns generation of a MOUSE_CLICKED event which I do not know if it should be expected or can be considered as bug. It seems that in JavaFX 2.0 you can…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/java" class="post-tag grid--cell" title="show questions tagged 'java'" rel="tag">java</a> <a href="../../questions/tagged/mouseevent" class="post-tag grid--cell" title="show questions tagged 'mouseevent'" rel="tag">mouseevent</a> <a href="../../questions/tagged/javafx-2" class="post-tag grid--cell" title="show questions tagged 'javafx-2'" rel="tag">javafx-2</a> <a href="../../questions/tagged/mouseclick-event" class="post-tag grid--cell" title="show questions tagged 'mouseclick-event'" rel="tag">mouseclick-event</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Jan 18 '12 at 13:47">asked Jan 18 '12 at 13:47</time> <a href="../../users/145238/c-ls" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/145238.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="C.LS" /> </a> <div class="s-user-card--info"> <a href="../../users/145238/c-ls" class="s-user-card--link">C.LS</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">1,319</li> <li class="s-award-bling s-award-bling__gold" title="2 gold badges">2</li> <li class="s-award-bling s-award-bling__silver" title="17 silver badges">17</li> <li class="s-award-bling s-award-bling__bronze" title="35 bronze badges">35</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-8126590"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>3</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>5</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/8126590/why-can-t-i-click-links-in-jquery" class="question-hyperlink">Why can't I click() links in jQuery?</a></h3> <div class="excerpt">I came across a curiosity in jQuery: if I call .click() on a link the click event handlers are called, but the link isn't actually followed (as if it were clicked in the browser): <a id="link" href="http://www.google.com>Link</a> $("#link").click()…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/javascript" class="post-tag grid--cell" title="show questions tagged 'javascript'" rel="tag">javascript</a> <a href="../../questions/tagged/onclick" class="post-tag grid--cell" title="show questions tagged 'onclick'" rel="tag">onclick</a> <a href="../../questions/tagged/jquery" class="post-tag grid--cell" title="show questions tagged 'jquery'" rel="tag">jquery</a> <a href="../../questions/tagged/mouseclick-event" class="post-tag grid--cell" title="show questions tagged 'mouseclick-event'" rel="tag">mouseclick-event</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Nov 14 '11 at 18:53">asked Nov 14 '11 at 18:53</time> <a href="../../users/784858/alex-peattie" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/784858.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Alex Peattie" /> </a> <div class="s-user-card--info"> <a href="../../users/784858/alex-peattie" class="s-user-card--link">Alex Peattie</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">26,633</li> <li class="s-award-bling s-award-bling__gold" title="5 gold badges">5</li> <li class="s-award-bling s-award-bling__silver" title="50 silver badges">50</li> <li class="s-award-bling s-award-bling__bronze" title="52 bronze badges">52</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="s-pagination pager fr"> <a class="s-pagination--item" href="../../questions/tagged/mouseclick-event_page=3" rel="prev" title="Go to page 3">Prev </a> <a class="s-pagination--item" href="../../questions/tagged/mouseclick-event_page=1" rel="" title="Go to page 1">1</a> <a class="s-pagination--item" href="../../questions/tagged/mouseclick-event_page=2" rel="" title="Go to page 2">2</a> <a class="s-pagination--item" href="../../questions/tagged/mouseclick-event_page=3" rel="" title="Go to page 3">3</a> <div class="s-pagination--item s-pagination--item__clear">…</div> <a class="s-pagination--item" href="../../questions/tagged/mouseclick-event_page=42" rel="" title="Go to page 42">42</a> <a class="s-pagination--item" href="../../questions/tagged/mouseclick-event_page=43" rel="" title="Go to page 43">43</a> <a class="s-pagination--item" href="../../questions/tagged/mouseclick-event_page=5" rel="next" title="Go to page 5"> Next</a> </div> </div> </div> </div> </div> <script src="../../static/js/stack-icons.js"></script> <script src="../../static/js/fromnow.js"></script> </body> </html>