event-handling

What event fires every time a TDbGrid's selected location is changed?

I've got a TDbGrid in my project, and I'm trying to have an event go off every time I change the selected row. Any change in row already updates all the data-aware controls linked to the same DataSource, but there are other changes to be made too, that I need an event handler for. I thought OnColEnter would work. According to the help...

Registering an event handler for a single list

I have a sharepoint event handler which I want to activate for a single list, not all the lists in the site. How do I go about this? ...

Firefox Javascript Events Anonymous Function

I'm attempting to register an anonymous function when a user clicks a cell in an HTML table. Here's some of the raw, unadulterated code: document.getElementById( "course"+displayed_year_index+occurrences_indices[displayed_year_index]).onclick = eval("function() {PrintReceipt("+result.years[result_year_index].rul_code+");};"...

How to get notified about changes on SharePoint groups.

Hi, I'm actual looking for a way to get notified about any changes on a SharePoint group. First I though I would be able to this by attaching a event handler to some kind of group list. But unfortunately there are no such list representing SharePoint groups. My second attempt was to bind a event handler to the content type SharePointG...

Do event handlers stop garbage collection from occuring?

If I have the following code: MyClass pClass = new MyClass(); pClass.MyEvent += MyFunction; pClass = null; Will pClass be garbage collected? Or will it hang around still firing it's events whenever they occur? Will I need to do the following in order to allow garbage collection? MyClass pClass = new MyClass(); pClass.MyEvent += MyFun...

When Are Custom Event Handlers Attached ?

I have a UserControl inside a GridView. When are the Custom Event Handlers attached to the UserControl ? Please tell me because I have no idea. In the scenario below the UserCreated event handler is null at the time the UserCreated event is fired, i.e. during DataBinding. Once the page has fully loaded the event handlers are available. ...

Unregistering Event with -=-Operator

Hi When opening a window, I register a Deleted-event-handler on my business object. It is passed to the constructor as business: business.Deleted += new EventHandler<EventArgs>(business_Deleted); Now the user can click a button to delete it (removing the record, you know). The event handler is registered to capture deletion by other ...

Can event handler defined within javascript object literal access itself?

I know I could do this with closures (var self = this) if object was a function... <a href="#" id="x">click here</a> <script type="text/javascript"> var object = { y : 1, handle_click : function (e) { alert('handling click'); //want to access y here return false; }, ...

How to Add Event Handler with Arguments to an Array of Elements in Javascript?

I have a three-step process that is entirely reliant upon JavaScript and Ajax to load data and animate the process from one step to the next. To further complicate matters, the transition (forward and backward) between steps is animated :-(. As user's progress through the process anchor's appear showing the current step and previous step...

event handler problems c#

hi, I have a handle that fires when the ItemAdd event is triggered on the Sent Items folder in outlook. This handle prompts the user and depending on their selection then opens a custom windows form to save the sent email. Now ... heres what happens ... The prompt shows fine when an item is placed into the Sent Items folder, if you d...

What is the difference between the KeyCode and KeyData properties on the .NET WinForms key event argument objects?

The two key event argument classes KeyEventArgs and PreviewKeyDownEventArgs each have two properties, KeyCode and KeyData, which are both of the enumeration type Keys. What is the difference between these two properties? Do the values in them ever differ from each other? If so, when and why? ...

Event handling in Visual C++

There are two pictureboxes with two different images. If I click on one picture box, the image in it should be cleared. To make the matters worse, both of the picture boxes have only one common event handler. How can I know which picturebox generated the event? I would appreciate source code in Visual C++.net I need to know what to wr...

Firefox: pass event from anonymous javascript function

In this abbreviated code, the inline event works - the "event" is passed to the testKeyPress function <textarea id="source" onkeydown= "showCursPos(this); var tf=testKeyPress(event); document.onkeypress=function(){return tf}; document.onkeydown=function(){return tf}; " ></textarea> function testKeyPress(e){ if (e...

Single event raising pattern for multiple controls

I have several controls on a page. It happens to be a Silverlight page but I don't think that it matters for this question. When a control's value changes, a change event is raised. In this event I do a calculation and change the value of one of the other controls. This in turn causes the other control to raise a changed event which in ...

Displaying a custom form on a new item event in SharePoint 3 document libraries?

Hi, Which is the best way to display a custom form for each new document being added to a specific document library? I want the user to have some control over some actions that adding the document will cause - specifically, tasks created for users in a Task List, which the contributing user will have to OK before committing. Is the ...

How do you execute a Javascript function without 'onclick' like "Grippie" in a new post on SOF

Such as the <div class="grippie" style="margin-right: 59px;"/> on stackoverflow when you post a question or answer. I get a nice css curser which lets me know of the moveable edge but how is the Java script which resizes the field finding out I clicked on the 'Grippie'? Thank you. Edit: Thank you for the answers which lead to Jque...

Fake "click" to activate an onclick method

I have an element with an onclick method. I would like to activate that method (or: fake a click on this element) within another function. Is this possible? ...

Is there a simple way to detect mouse or keyboard activity in Linux/Xorg/Qt4/Kde4?

Is there a simple way to detect mouse or keyboard activity in Linux or Xorg or Qt4 or Kde4 environment? Obviously not only on a particular window but in the entire Xorg desktop. Thanks for the help. ...

Refer to a html List item object properly in javascript for Event Registration

I would like to know how I can refer to a list item object if I had for example the following html list <div id="subdiv_2"> <div id="subdiv_3"> <ul> <li><a href="">Item1</a></li> <li><a href="">Item2</a></li> <li><a href="">Item3</a></li> </ul> </div> </div> How is it possible to register an onclick ...

How to ensure an event is only subscribed to once.

I would like to ensure that I only subscribe once in a particular class for an event on an instance. For example I would like to be able to do the following: if (*not already subscribed*) { member.Event += new MemeberClass.Delegate(handler); } How would I go about implementing such a guard? ...