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
-1
votes
1 answer

Webpage responding differently to javascript .click() than a normal mouse click

When I click on a particular element on a webpage using multiple different variants of the .click() event e.g. document.querySelectorAll(selector)[pos].dispatchEvent(new MouseEvent('click', {{ bubbles: true, cancelable: true, view: window }})); or…
Jimmy J.K.
  • 25
  • 6
-1
votes
1 answer

Why do I have to click two times on a button to be redirected to the right url?

I have this click event written with Angular material in the app.component.html file:
-1
votes
2 answers

c# winform : How to ignore the event of leaving the mouse after clicking on the label?

The program practically executes the mouse leave event after the user clicks and leaves the mouse from the control, if I do not want to run the mouse leave event when the click is executed. private void LblNoeMelk_MouseHover(object sender,…
Sam
  • 3
  • 2
-1
votes
1 answer

Why does "click" event happen on load when I use addEventListener?

I used document.querySelectorAll() get a NodeList of all buttons in the HTML file, then iterated through each button to add an event listener to each button to listen for a click on each button. document.querySelectorAll("button").forEach(node => { …
eg3
  • 25
  • 2
  • 6
-1
votes
1 answer

How To use MouseClicked event to prevent mouseExited event?

I've got a simple java swing code where a text field changes when the button is hovered over and clicked, but when i use a variable to deactivate the mouseExited event, it does not work and continues to change the text field. I think its to do with…
-1
votes
1 answer

Why onclick function isn't working in Javascript snippet below?

function toggleHide(){ let btn = document.getElementById(`btn`); let para = document.getElementById(`para`); if(para.style.display != 'none'){ para.style.diplay = 'none'; } else{ para.style.display = 'block'; } }
user13346803
-1
votes
1 answer

JavaFx Pane in Stack not responding to MouseTransparent or PickOnBounds

I have a SplitPane and a Pane together in a stack. The Pane is underneath the SplitPane in the stack, and the middle SplitPane is a transparent AnchorPane. My intention is for an event to fire which draws a circle on the underlying Pane when I click…
paullc
  • 27
  • 6
-1
votes
3 answers

Python check if Left Mouse Button is being held?

I'm pretty new to Python and I'd like to make a kind of an Autoclicker, which keeps clicking every 0.1 seconds when my left mouse button is held down. My Problem is, that when I run my script, my mouse instantly starts clicking. What should I…
Dom
  • 47
  • 2
  • 7
-1
votes
2 answers

Programmatically add Click EventHandler to Button

I'm creating Buttons programmatically with a method and am wanting to attach a Click event handler. However, that data currently comes from a string parameter which can't be used with += RoutedEventHandler. public Button CreateButton(string Display,…
Jalfie
  • 69
  • 1
  • 2
  • 8
-1
votes
1 answer

Mouse Listener on Rectangle

I'm trying to draw a game map using many rectangular shapes(just like a screen contains many pixels). I'm using graphics 2D and fillRect(int x, int y, width, height) method. I make the rectangular so small with 10 widths and 10 height. How can I…
-1
votes
3 answers

how to autohide the panel on mouseclick event in c#

how to slide panel on mouseclick event in c# windows application i have tried this panel1.Location = new Point(panel1.Location.X - i, panel1.Location.Y); System.Threading.Thread.Sleep(10);
-1
votes
1 answer

Sending keystroke/mouseclick via PostMessage() in C#

I already got mouseclick to work with one issue. If I set delay between WM_MBUTTONDOWN and WM_MBUTTONUP to more than 5 ms it won't work. Why is that? [DllImport("user32.dll")] public static extern IntPtr PostMessage(IntPtr hWnd, uint Msg, IntPtr…
guuczi
  • 79
  • 1
  • 1
  • 6
-1
votes
1 answer

vb.net masked textbox and datetime now string not working together?

I have a masked textbox set to date.short I would like to automate the cuurentdate to be filled in when the masked textbox is clicked I though the following would work but I get the error InvalidCastExpectation was ungandeld "Application is in break…
LabRat
  • 1,996
  • 11
  • 56
  • 91
-1
votes
1 answer

Axes ButtonDownFcn not being executed when plot object is selected

I am creating a real time MATLAB demo and I need to select a point of interest by clicking on the axes. In general, the system works fine and I am able to modify the variables using the ButtonDownFcn. However the following problem occurs When I plot…
-1
votes
4 answers

Js mouse click events

Is there an event function that activates if a mouse is clicked that goes like this: var mouseclick = function(e) { if(e.mouseclick==true){ alert("Hi"); } } I'm trying to make it if i click a certain area of a canvas.
Bruce Wayne
  • 11
  • 1
  • 6