event-handling

DataGrid new row added event

I have a datagrid with a long content list and its first row is selected as default. I want the scrollbar of the datagrid to be scrolled to the bottom, when a new row is added. I thought I achieved this by a selectionChangedEventHandler and scrollIntoView(item) method, but I just realized that when I try to scroll down by hand-without ch...

QT mouse event handling problem

Greetings all, As seen in the picture I have an extended QWidget object (which draws the cell images and some countour data) inside a QScrollBar. User can zoom in/out the Image (QWidget size is changed according to the zoomed size of the QImage ) using mouse wheel. I process the events (mouseMoveEvent(),wheelEvent()..etc) by impleme...

PowerPoint 2007 - How to use Application.NewPresentation event handler?

Hi, so I've found that PowerPoint 2007 does indeed support event handlers on the Application level. For example Application.NewPresentation or even Application.AfterNewPresentation It's described here http://msdn.microsoft.com/en-us/library/ff745073.aspx But the real question is, how do I use these? Where do I use them? To tell you my ...

Event not Firing in MS Access VBA

I have a form in MS Access which has an image. The image has an Click event which opens a modal form. The modal form has an OK and Cancel button. When you click the OK button, an event is supposed to fire which tells the main form which button was clicked. (This is to simulate the DialogResult functionality in C#). However, the code...

What is the best way to execute a function when user clicks on a link?

From my experience I know three different ways to execute a Javascript function when a user clicks on a link Use the onclick attribute on the link <a href="#" onclick="myfunction();return false;">click me</a> Use the href on the link <a href="javascript:myfunction();">click me</a> Don't touch the link, do everything in js <a href...

Tutorial OpenCl event handling

Hi, In my last question, OpenCl cleanup causes segfault. , somebody hinted that missing event handling, i.e. not waiting for code to finish, could cause the seg faults. Since then I looked again into the tutorials I used, but they don't pay attention to events (Matrix Multiplication 1 (OpenCL) and NVIDIA_OpenCL_GettingStartedLinux.pdf) ...

Handle Click- Events of Dynamically generated buttons..?? VB.NET

HI, Am on creation of touch screen UI system.And am generating button for selecting products Under certain category. --> array of button creating dynamically And placing in TABPAGE when user selects Tab for category. The button will be created with the name of products, Under the category selected. { 'the way am creating controls. myb...

How to add GestureListener handler to a control in cs code in silverlight?

I don’t understand how to use some features from Windows Phone Toolkit in cs code in Silverlight (more precise, I don’t understand how to use GestureListener). I saw many examples of using GestureListener in xaml like this <Image Source="something.jpg"> <toolkit:GestureService.GestureListener> <toolkit:GestureListener Tap="i...

Question on EventHandler from Josh Smith's MVVM sample application

The following code is from the MVVM sample by Josh Smith: /// <summary> /// Raised when this workspace should be removed from the UI. /// </summary> public event EventHandler RequestClose; void OnRequestClose() { //if (RequestClose != null) // RequestClose(this, EventArgs.Empty); EventHandler handler = this.RequestCl...

Javascript add events cross-browser function implementation: use attachEvent/addEventListener vs inline events

In order to add events we could use this simple 1st solution: function AddEvent(html_element, event_name, event_function) { if(html_element.attachEvent) //Internet Explorer html_element.attachEvent("on" + event_name, function() {event_function.call(html_element);}); else if(html_element.addEventListener) //Firefox &...

How to pass parameters (other than event) to event handlers?

The following code renders 3 buttons with label "1", "2" and "3". Clicking on each button will alert the label. <!DOCTYPE html> <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"&gt;&lt;/script&gt; <script type="text/javascript"> $(function() { ...

Get "event" object within the immediately executed function?

I use event delegation in such way: elWraper.onclick = (function(){ //how to get here "event" object e = e || window.event; var t = e.target || e.srcElement; //event handler return function(){ //manipulations with "t" variable } })(); how to get "event" object within the immediately executed function? ...

Message passing architecture for AS3 and c++ app interaction

I have a actionscript 3 based desktop Flash app which has its own event model(GUI component) and another native c++ application(business logic) which has its own model. I want to connect them and have a middleware module which can act like an arbiter between the two and dispatch events across the two components according to some model lo...

WPF Is it legal to invoke another event from within an event-invocation-method.

The following code was part of an answer I have received to solve a probem I have posted in SO. It works fine, however I'm curious if its allowed to manually invoke another event from within an invocation-method with the EventArgs of the original event: protected override void OnMouseLeftButtonUp( MouseButtonEventArgs e ) { ba...

some keyboard/mouse events cant be caught-xlib programming

hi .. i have a problem with this program ,it lists the current window along with window id thet are running on the system,result is that for a particular window id that i enter i got odd result: for application like firefox or gedit just motion notify event works,non of the other events work?? for my terminal(bash) everything works,key p...

Subscribe to event of changing time on local system

Is there a way to my C# winforms application knows when Date and time settings has changed on local computer. ...

Adding own event handler in front of other event handlers

When I utilize AddHandler in VB to add my own method to the Click event : AddHandler Button.Click, AddressOf myButton_Click I see that my code executes last - after other event handlers for the Button_Click event. Is there a way to insert my event handler in front of other events so that it executes first? I tagged this questio...

Form is not updating, after custom class event is fired.

I'm having an issue where my main form isn't updating even though I see the event fire off. Let me explain the situation and share some of my code which I'm sure will be horrible since I'm an amateur. I created a class to take in the settings for running a process in the background. I add some custom events in that class so I could us...

Detect scroll event on Android browser

Hello, I'm trying to detect the scroll event in Android browser (my specific version is 2.1, but U want it to work also on older versions). This seems impossible! I first tried this: document.addEventListener('scroll', function(){ alert('test'); }, false); But nothing is triggered (except when the page load). I thought: well, let's...

Drag-and-drop event override C# GUI

I have a drag-and-drop event handler registered to a parent form, this.DragDrop += new DragEventHandler(Form_DragDrop); There are several child form that are derived from the parent form. However, when I drag an item inside the forms, the action is only valid if there are no other components in that area. I would like the drag-and-...