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
5
votes
2 answers
Using showAndWait in the onFinished EventHandler of an Animation doesn't work
In JavaFx, I want to show a modal dialog after an animation ends. For some reason, calling showAndWait in the EventHandler that gets executed after the animation ends doesn't work. A new window is shown, but it seems like nothing is drawn inside…

bmesuere
- 502
- 3
- 12
4
votes
0 answers
Subscribing Methods to Events from another Class in C#
Hello swarm intelligence!
Imagine the following:
We've created a rudimentary server / client software to send Events through a local network to invoke Methods in another Program.
This is done via an array of Bytes build like:…

de0x95
- 61
- 4
4
votes
2 answers
Are C# events feasible for domain events in DDD?
I read that people use event dispatching libraries for domain events in their domain-driven design.
The C# language have built-in support for events using the event keyword together with the EventHandler<> class. Is it feasible to use this instead…

Fred
- 12,086
- 7
- 60
- 83
4
votes
1 answer
How to resolve LazyInitializationException in Spring data rest @RepositoryEventHandler @HandleAfterLinkSave?
I have a spring data rest application with relation between types Match and Round
@Entity
public class Match {
@OneToMany
private List rounds;
...
}
When a link is created between a match and a round, e.g. like this
curl -X PUT…

cybodelic
- 43
- 5
4
votes
1 answer
WPF CroppedBitmap + RenderTargetBitmap = EventHandler leak problem and Freeze problem too
I am wondering if there is a .net EventHandler leak surrounding CroppedBitmap and RenderTargetBitmap. It's causing me a huge nightmare!
My WPF app runs an always running render call at 60fps. I noticed that after a time, the content being rendered…

Martin B
- 61
- 6
4
votes
5 answers
event vs eventhandler in javascript
My teacher says that onclick in javascript is an event and an event handler.
But i'm not able to agree with her, I find them to be different but can't distinguish properly.Have done a ton of google search , couldn't find anything relevant.
So…

GARIMA JAIN
- 61
- 7
4
votes
1 answer
c# for-loop and Click Event Handler
How do I use one individual event handler per iteration, without hard coding the functions?
for (int i = 0; i < 100; i++)
{
//other code
PictureBox listItem = new PictureBox();
listItem.Click += new EventHandler((sender2, e2)…

Reese
- 253
- 5
- 15
4
votes
1 answer
Remove eventHandler that was added using lambda expression
I have a control that I added an event to. However, I needed to pass some extra parameters to the event method, so I use lambda expression like it was described here:
Pass parameter to EventHandler
comboBox.DropDown += (sender, e) =>…

Karlovsky120
- 6,212
- 8
- 41
- 94
4
votes
1 answer
One Event Handler for multiple JButtons
I want to add an EventHandler for multiple JButtons in Java. I use a JButton array JButton[] buttons = new JButton[120]. I used this solution
for (int i=0; i

dios231
- 714
- 1
- 9
- 21
4
votes
1 answer
How to find pictureBoxes in the form and add specific EventHandler to them
I want to have a picture album that when I click any picture it goes to another form to edit that picture.
Now I have some pictureBoxes in the form with the names like PB0, PB1, PB2,...
and a method like this
private void msgShow(int id)
{
…

Arash.Zandi
- 1,010
- 2
- 13
- 24
4
votes
2 answers
Efficiency: one event handler or multiple
There is a question with a good answer about binding multiple objects to a click event here, but the answer deals with only buttons inside a container. I am wondering what happens if there is a more complex structure, with elements inside the…

Michel
- 4,076
- 4
- 34
- 52
4
votes
3 answers
Run a function after an on.change event
I have something like this: $('#select1').on('change', function() {}) and it works fine. However, I need to run another function after the function has completed.
I thought about taking the function contents, and putting it in a named function, then…

nobrandheroes
- 748
- 1
- 10
- 17
4
votes
3 answers
Is there a numericupdown event for value increasing in c#
I need an event that happens when the up arrow is pressed and another when the down arrow is pressed. is there an event handler for this? all I can find is valuechanged?

john
- 159
- 3
- 16
4
votes
2 answers
how to override built in event handler in WPF c#
In my project, I want to override Touchup Event Handler which is build in the WPF. I do not know how to override this event handler for my own use. Is that possible? Someone could give some examples, I do not get some references or example about it.…

user2137886
- 61
- 1
- 7
4
votes
2 answers
javascript addEventListener not working more than once
I'm trying to do a relatively simple javascript program/page, just 3 sliders RGB to affect the color of a square and circle.
It works GREAT when I have the event listeners 'inline' with the input elements: i.e.,…

Wisecat
- 43
- 1
- 1
- 5