In object-oriented programming languages (such as C++, Lazarus Pascal or Visual Basic), visual objects (or components) can respond to *events* (usually) by the user. An event handler is the block of code that runs when an event occurs. Eg: *Onclick* event for a command button.
Questions tagged [eventhandler]
800 questions
-1
votes
1 answer
Use default event in a single element when default action is prevented for document in javascript
I have an onMousedown and an onMouseup eventhandler on the document that prevents default event.
Now there is a single form element (a select field) where I want to use the default action. Can I somehow call it from javascript?
Something like:
…

Big Bene
- 1
- 2
-1
votes
1 answer
javascript cannot read property '0' of undefined
I'm initializing my var like this at the top of my .js file:
var angle = 0;
And then I add an event handler to detect key pressing and increase that variable:
document.addEventListener("keydown",
function (event) {
switch…

Oscar Sales Salvador
- 11
- 1
- 5
-1
votes
2 answers
Can somebody explain to me what this does?
So, I'm quite new to C# programming, and I had a friend help me out. He made this code:
private void Form1_Shown(object sender, EventArgs e)
{
System.Timers.Timer t = new System.Timers.Timer(50);
t.Elapsed += t_Elapsed;
…

Neebz
- 69
- 8
-1
votes
3 answers
C# label should do diffrent things when clicked
I need a label which does something different with every click.
private void open_Click(object sender, EventArgs e)
{
for (int i = 0; i < 5; i++)
{
builder = new StringBuilder(4);
…

aha364636
- 365
- 5
- 23
-1
votes
1 answer
Javascript and onMouseOver
I have created a script, which holds a div-container. The moment i move the mouse quickly left and right on the container, it does not work anymore. Google Chrome does not process it properly either, why?
move…

BornToFlyBert
- 1
- 1
-1
votes
1 answer
How to do form field repetition in JavaScript?
I got a form with a list of games I'm asking people to add that they've played.
It says "Add Game" with a hyperlink which has an event handler onClick which directs to a JavaScript function - it only does this once but I want it to do this as many…

Jose Sanchez
- 7
- 1
- 6
-1
votes
4 answers
highcharts event handler for StockChart
I was looking at http://api.highcharts.com/highstock#chart.events.
I want a event handler to capture event when ever there is a change in the date range.
This change in the date should be captured for all changes in date. For e.g. when the a button…

Joseph J P
- 71
- 1
- 1
- 12
-1
votes
1 answer
Trouble raising events from C++ to be handled in C#
I'm trying to write a C#-based WPF application that uses a C++ DLL. The C# application is for the user interface and it has all advantages of WPF. The C++ DLL uses Win32 functions (for example to enumerate windows).
Now I want the C++ DLL to raise…

Jan Böhm
- 89
- 1
- 11
-1
votes
1 answer
How to get all the controls on a .Net Application dynamically?
I have been researching from the past couple days on how to write a method in C# that can dynamically get all the controls while clicked on a .Net Application. Most of the examples out there are on buttons that you specify for example
ctl.MouseClick…

Noxer2013
- 1
- 1
-1
votes
1 answer
save data to popupmenu
I have a popup-menu that has an option, add own material, and when this is chosen, a pushbutton is enabled that say SAVE. I alose have a bunch of edit-boxes.
What I want to do is to make a callback so whenever I click the SAVE, the data from one of…

user3796906
- 35
- 7
-1
votes
1 answer
On c# the mousehover on a picturebox appear to do nothing.Do i need some kind of eventhandler?
I am trying to create a MouseHover event for a pictureBox, but I have had no luck so far:
private void pictureBox1_MouseHover(object sender, EventArgs e)
{
pictureBox1.Image = ArgyroCinema.Properties.Resources.ktz00h07;
label1.Text =…

CDrosos
- 2,418
- 4
- 26
- 49
-2
votes
1 answer
JavaFX: Help setting event listeners to set variables and print text?
I am writing a program that is a "sandwich ordering app". Think subway. Bread choice, meat choice, cheese choice, etc. I'm trying to use each type of element (radio buttons, combobox, slider, listview, checkbox, and textfield). I am having trouble…

torireb
- 1
- 2
-2
votes
1 answer
Is the following code in c# cause memory leak issue?
I was wondering if the following code create a memory leak:
using System;
namespace ConsoleApplicationTest
{
internal class Program
{
static void Main(string[] args)
{
CreateMemoryLeak();
…

David Lefaivre
- 191
- 3
- 14
-2
votes
1 answer
c# How do I unsubscribe a private method subscribed to an event from it's derived class?
How do we unsubscribe a private method subscribed to an event from it's derived class?
For eg:
Base Class :
class Base1
{
public Command Comm;
public Base1(){
Comm.OnFailed += DoSomething;
}
private void DoSomething(Exception…

Santhosh
- 729
- 7
- 19
-2
votes
1 answer
How to make EvenHandler work properly in JavaFX?
I re-arranged my question so it would be easier.
This code should generate Window and I need console output on press of keyboard.
Window appears but my EventHandlers doesn't works.
import javax.swing.*;
import java.awt.*;
import…

Šimon Slabý
- 533
- 1
- 4
- 18