Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [eventhandler]

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.

eventhandler
0 votes
0 answers
9 views

Pressing button in the main window to execute an even in user control

First, I would like to mention that I am a beginner with C#/WPF and trying to do my best to learn it. I have a main window with multiple navigation buttons on its left side to navigate between user ...
Vlad Petra's user avatar
-1 votes
0 answers
63 views

jQuery: onclick event works only the first time

Trying to add two event handlers on two elements respectively. The second element will only appear in DOM after users clicks the first element. My problem is the first event handler only work for one ...
Jane Lim's user avatar
0 votes
1 answer
103 views

How to Handle Incoming Messages in TelegramBotClient in C#?

I'm trying to develop my first Telegram bot using C# in Visual Studio. I've been following tutorials, and everything seems to be going smoothly. However, when I try to handle incoming messages using ...
Hossein Hedayati's user avatar
-1 votes
1 answer
54 views

Calling Function from Click Event in Leaflet

I am hoping there are some Leaflet experts here who can explain what I'm missing in the code below. I am only a hobbyist programmer so I apologize if my terminology doesn't make complete sense. I was ...
mshamrock's user avatar
0 votes
1 answer
38 views

C# Event Handler Issue Updating Control

So, here is the layout: frmClient = uses frmLogin (LoginWindow) which has OnLoginEvent this event is received by frmClient, and will update the statusbar (doesn't have invoke) frmClient also uses ...
Josh's user avatar
  • 47
1 vote
3 answers
2k views

event and event listener laravel 11

I can't add constructor in my event listener.Laravel 11 there is no EventService provider also. I need an example for this public function handle(NewUserEvent $event): void { Mail::send('...
Amrutha K's user avatar
0 votes
0 answers
29 views

SQL Server Job execution after the job stopped

I started one a job from the ‘Job Activity Monitor’, I stopped the job after few minutes once I realized that this is not the job I should be running. The next day, the stopped job triggered by the ...
maheshk.online's user avatar
1 vote
2 answers
54 views

in python code, Is this a proper place to use dependency injection -- if so, how

The code setup is as follows: Module ui_theme.py defines a theme and variant selector. variant_selector has an on_change event handler. Module cards_page.py imports ui_theme.py and has a handler ...
Kabira  K's user avatar
  • 1,985
0 votes
0 answers
47 views

C# EventHandler invoke in class A, action to run in class B

I have implemented an eventhandler that should be invoked when "OpenProject" is completed. The event is listened from another class. What I see testing the code is that the "work inside&...
Simo's user avatar
  • 1
0 votes
0 answers
16 views

Facing issues with dropdown button in Flask

I am building a basic search page in Flask. When the page loads, I enter the search bar and get the results. Then when I click on the drop-down, I can only select 1st option, "Organization" &...
Viraj Rathod's user avatar
0 votes
1 answer
49 views

How to loop over an array and create a unique event handler for each item

In my application, I have a list of apps, apps = [ App("app1", "username1", "password1", "----"), App("app2", "username2", "...
Bobson Tobson's user avatar
1 vote
2 answers
100 views

Passing C# function in constructor to be used as a subscriber to EventHandler delegate

I've been spending some time learning about Delegates in C# and have wired up a small Windows Form app containing two forms to test them out. My goal is to have the AddContactForm push new Contact ...
Acadian_Ghost's user avatar
0 votes
1 answer
128 views

How to get data from a static event-handler for serial port

I'm currently write a method that read data consecutively from serial port in C# winform for .NET framework. I write an event handler for it, but since its static, i cannot call variable from outside. ...
zyp8x's user avatar
  • 27
0 votes
0 answers
58 views

user to logout if browser tab/window is closed after getting idle timeout popup on screen without choosing options to extend /end

onidletimeout.subscribe(=> { if(confirm('your session is expired. Press 'OK' to refresh or 'cancel' to logout')){ this.document.reload(); } else{ this.msalService.logout(); }}); this is the code ...
Sushmitha Hegde's user avatar
0 votes
1 answer
64 views

How to get status by add rows dynamic in javascript

I want ask about rows dynamic in javascript. I should input the value into field result, and then the field status will automation fill pass or fail. But when I added the second rows, I can input the ...
Ayu Asri Lestari's user avatar
0 votes
0 answers
11 views

MVVM Error Message Handling in Subclasses: Seeking Input

I'm looking for input on a MVVM design-decision. I want to send error messages from my subclasses to my MainWindowViewModel. Is this a good way to go about it or are there simpler or better ways to ...
Martin Wiklund's user avatar
0 votes
1 answer
77 views

How to open the event handler to a link button in a WebForm (VB.net)

I did my first app but I am having hard time to find the event handler to my link button which I have created. I connected my gridview to my SQL file, did validations all I have to do now is to "...
Adele's user avatar
  • 1
0 votes
1 answer
135 views

can I perform async calls in an EditContext.OnFieldChanged

Inside an EditContext OnFieldChanged event, when I have one specific field change, I need to write the change to the database. This is a Blazor server app and I use Entity Framework. Is it ok for this ...
David Thielen's user avatar
0 votes
0 answers
17 views

Event Handler not fired in AngularJS

I have 2 directives in AngularJS app., and I have a button to open a popup modal in a directive, so I fire event when the button clicked to run a function from the other directive. the issue is the ...
Amr Elnashar's user avatar
  • 1,769
0 votes
1 answer
88 views

SSIS Event Handler sends me message, even when there is no error

I have a SSIS package and set Event Handler (OnError) to send me a message with logs: "Package: " + @[System::PackageName] + "\n" +"Start Timet: " + (DT_WSTR, 40) @[...
Houman Fathi's user avatar
0 votes
1 answer
61 views

Pass event handler to object constructor as an argument

I have a method for executing batch scripts in memory by passing along a list of commands and executing them in a new Process. I use this method for running things like psql and gpg commands and it ...
G_Hosa_Phat's user avatar
  • 1,070
1 vote
0 answers
360 views

Playwright - How to access Event Listeners stored data using Javascript?

I'm currently writing an e2e test case using Playwright with TypeScript. I want to get the data stored in Chartjs canvas. I found it's stored in the element's event listener handler and tried to ...
Clara Lee's user avatar
0 votes
0 answers
63 views

How to handle events from Usercontrol in separate AppDomain

I have a number of dll assemblies with usercontrols that I load into a Border control in my main window (like old MDI approach). I wish to now load these assemblies into a separate AppDomain. I have ...
Seer's user avatar
  • 3
0 votes
2 answers
63 views

When I submit my form, it refreshes, overriding my preventdefault() method. I can't fix it

I initially had it working, but when I added the dark mode toggle, it began to read the dark mode toggle as a submit event, and would change the colour of the beer bottle and display the enter/Don't ...
davelangham's user avatar
1 vote
4 answers
283 views

How can I remove the event listeners from within a javascript class?

I already saw this thread, but I think my case is a bit different. This is an example class, whose constructor receives an element as parameter, that can be moved dragging it. But it does not stop ...
anvalon's user avatar
  • 41
1 vote
2 answers
674 views

Delphi - Adding onclick to a button created at runtime

I have a procedure that creates a customtitlebar and titlebarpanel at runtime for any form name passed to it. The purpose of this is to handle the creation automatically for a bunch of different ...
Some1Else's user avatar
  • 775
2 votes
1 answer
379 views

Add different sounds to different buttons

I am working through a project using Javascript and jQuery. The projects requires me to add sounds to buttons. A different sound should play depending on the button I click. I know how to add a single ...
Leslie W.'s user avatar
-2 votes
1 answer
129 views

JavaFX: Help setting event listeners to set variables and print text? [closed]

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,...
torireb's user avatar
0 votes
0 answers
206 views

C# - Serializing to XML information as to which function to bind a delegate too

I need to be able to save a delegate with the information of which function it is connected to. Something like this: In C#: public class Skill { [XmlAttribute("SkillFunction")] ...
user avatar
0 votes
0 answers
55 views

Macro correctly running in the debugging, but when event is triggered it not running after the first event

I have a macro associated with a workbook to trigger some events when data is entered in column B. Along with this, there are two other modules related to this to for uploading excel when so many data ...
San Jay's user avatar
  • 25
-2 votes
1 answer
217 views

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) { ...
David Lefaivre's user avatar
1 vote
1 answer
37 views

How do I use Declarative Services to ensure that EventAdmin is not null?

Im new to OSGi and I tried to create a simple EventPublisher/-Admin application using DS to ensure that the EventAdmin is not null. But I'm not sure how to use the DS in the right way. The Activator ...
Jona's user avatar
  • 13
1 vote
0 answers
23 views

what is the best jsript event handler to use when data is change through other script for select? [duplicate]

I am trying to make, the value for the value media and unit media, change when the object is select, yes the object do change when I change upon the available item to select, but my target is to ...
Muhammad Faiz Abdullah's user avatar
1 vote
1 answer
265 views

Visual Studio 2022 (C++) "Add Event Handler..." generating bad names

I am working on an MFC application with a Ribbon Bar and am experiencing difficulty adding event handlers for new controls from the Ribbon Designer. This was working fine the last time I edited the ...
Dave2501's user avatar
-1 votes
2 answers
465 views

React event handler is not working at all [duplicate]

import React from 'react'; import './Button.css'; import iconsdown from './iconsdown.png' ; import iconsnext from './iconsnext.png'; function Button() { const handleEvent=(e) =>{ console....
rakib .h's user avatar
1 vote
0 answers
112 views

DataGrid Event Handler has an error that prevents the live view from being updated

I am having an interesting issue. I am using Visual Studio 2022. In my XAML code, I have a DataGrid with EventSetter. The Handler is alerting on "Invalid value for property 'Handler'. This error ...
Vlad Petra's user avatar
-1 votes
2 answers
2k views

Updating multiple input fields onchange in react

I really hope that you guys can help me with this. Basically, I am creating an invoice form where users can add multiple items. I have 4 fields for those items: ItemName, ItemPrice (unit price), ...
OJ STUDIO LIVE's user avatar
2 votes
1 answer
277 views

NullReferenceException thrown but the object passed the null check, how is that possible?

I'm using the AddEventHandler method from that answer, but when doing it on an EventHandler with a value type argument that happens: using System.Reflection; public class Program { public static ...
KBar's user avatar
  • 92
1 vote
0 answers
192 views

Emit was called after an event handler completed normally [Flutter]

Exception is thrown on second call 'emit' inside 'firstEvent' case. I know why, but I dont know how to make it work. Problem exists when I use event.map. _AssertionError emit was called after an event ...
Piotr Temp's user avatar
2 votes
1 answer
265 views

Serialising an HTML element that has event handlers

I am currently making a website for a class that I am in. It is supposed to be a store, made in Pure HTML, CSS, and JavaScript (no libraries including jQuery). I am currently attempting at making a ...
highjeans 's user avatar
0 votes
2 answers
442 views

How to make circles around Marker be created and removed when Marker is clicked on the react-leaflet

I think this problem is to use Popup or eventHandler. But when i used Popup, The circle is created but not removed. And I have no idea how to make a circle using eventHandlers. This First Code is use ...
kimjaku's user avatar
  • 11
0 votes
1 answer
248 views

How do you change the value to an acceptable value after a NumberBox's ValueChanged event is triggered using WinUI3?

I have a list of Images with corresponding NumberBoxes in a GridView. This is the XAML: <DataTemplate x:Key="CardListView_ItemTemplate" x:DataType="local:CardItem"> ...
John Glen's user avatar
  • 883
3 votes
2 answers
1k views

How to pass EventHandler as parameter in Blazor

Trying to pass an EventHandler to a Blazor component. Error I'm getting: The event AppState.IntegerChanged can only appear on the left hand side of += Seems like this should work, is it a blazor ...
user1068557's user avatar
-1 votes
2 answers
133 views

How to fix a Function for Button click event executes on page load [closed]

In my MERN app I am trying to take a screenshot of a portion of the webpage to send it to the database with other info that is submitted such as submitter and description. The problem is, the image is ...
Steve's user avatar
  • 45
1 vote
1 answer
137 views

eventHandler trigger multiple times when using .on() only

function changeStatus() { $('#dataTable tbody').on('change', '.orderStatus', function () {..code} } function showOrdersInModal() { $('#dataTable tbody').on('click', '.fa-eye-btn', function (e) ...
Shinxx's user avatar
  • 47
-1 votes
2 answers
122 views

How to write Java Script arrow functions in regular function syntax?

I need help to rewrite some arrow functions to regular functions but right now my brain is totally stucked, I have some example code here from a rock paper scissors game I got from kyle, how would it ...
Peterman's user avatar
0 votes
1 answer
588 views

Task.Run invoking an EventHandler. Is it correct?

I am writing unit tests for an async method and I think I should avoid .Invoke inside Task.Run in the next function. Here is the current code under test: public class Foo { public event EventHandler&...
Alberto Martín's user avatar
1 vote
1 answer
249 views

Why don't we create an Event Handler delegate for binding a handler with an event when programmatically creating an event handler?

I am creating a Windows Form application in Visual Studio using C#. I am having trouble understanding the concept of Event Handler Delegates. If I create an event handler for an event using the ...
Aiman Fayyaz's user avatar
-1 votes
1 answer
407 views

How do I change the text of a System.Windows.Forms.Label from a public static void button_click event?

More details: Assume I am creating a form and a button and a label in the main function, and I want the label text to change when I click on the button. I am getting an error that the label is outside ...
user20255552's user avatar
3 votes
2 answers
3k views

How do I set the correct type for a click handler when using Svelte with TypeScript?

I am using Svelte with TypeScript. I have a button: <button on:click|preventDefault={clickHandler}> Click me </button> I am trying to set the correct type for the click handler. export ...
mikemaccana's user avatar

15 30 50 per page
1
2 3 4 5
17