OLD QUESTION (Already answered by Mark - The answer is to use getTag()):
Let's say I have a ListView with a custom layout for each row having an ImageView and a TextView. Now, when a click is made, I am able to determine which image and which textview were clicked based on the view but if I have to pass this information to say another ...
Hi everyone!
I'm new here and have a really mysterious problem to start off. I'm a software developer in the UK and have over 15 years of experience but have only been developing in .Net for 18 months. My NotifyIcon mouse events are not firing!
I am using C# to write an application that starts as a NotifyIcon ('main app icon') and disp...
How do I go about overriding the default functionality when a user clicks the X in a VB.NET form-based application?
I am currently handling the MyBase.Closing event... but since it's a DirectX app, I need to do some cleanup before allowing the form the close.
Thanks
...
I'm in the process of transplanting a unit test written in vb.net to the larger project written in c#. However, this little ditty has me looking for help.
Public Sub object_DataChange(ByVal TransactionID As Integer, ByVal NumItems As Integer, _
ByRef ClientHandles As System.Array, ByRef ItemValues As System.Arra...
Say I have two classes which extend Event:
public class CustomEventOne extends Event
{
public static const EVENT_TYPE_ONE:String = "click";
//... rest of custom event
and
public class CustomEventTwo extends Event
{
public static const EVENT_TYPE_TWO:String = "click";
//... rest of custom event
Is it ok that they...
You can refer to this question for background/explanation of what the context to my problem is.
Basically, I have a WPF DataGrid bound to an ObservableCollection of an IEditableObject object. In a custom DataTemplate, for one of my columns that involves a flag enum property, I have constructed an Expander whose content is a bunch of che...
I've been trying to learn about events/delegates, but am confused about the relationship between the two. I know that delegates allow you to invoke different functions without needing to know what particular function is being invoked. (eg: a graphing function needs to accept inputs that are different functions to be graphed).
But I don...
I want some event handling functions to only be able to be accessed via raised events and not called from the program.
Such as:
Public Event Event1(Byval TheText as string)
private sub Event1Handler(Byval TheText as string) handles me.Event1
msgbox("Hi")
end sub
I want this code to execute the function:RaiseEvent Event1("Hi")
But...
I have been trying to wrap my head around this one, and a lot of tutorials and sites have been suggesting the creation of a separate event object, which seems to be a bit of overkill for just implementing one function to happen at some point in the object.
Basically I want to have a custom "onComplete" event to fire when certain methods...
I have a VB6 application implemented as an ActiveX exe.
I also have a C# application that interacts with the VB6 app via COM.
This all works fine except in one scenario.
If the VB6 app is kicked off from the C# app, everything is fine. If, however, the VB6 app is already running stand-alone, then although the COM interface still works...
I am new to OOP Javascript and am having trouble with the this keyword and events.
What I'm trying to achieve is: I have multiple DOM objects and want to not only bind a common event to them, but keep some data about the aforementioned objects in a global container (to increase runtime performance).
So what I do is basically this:
f...
I would like to know how I can maintain the scroll position when I open a jQuery dialog.
Here is the code I'm using to open my dialog:
<a class="link" onclick="openmyDialog();" href="#">Open a dialog</a>
And the function :
function openmyDialog()
{
$("#dialog").dialog('destroy');
$("#dialog").html("msg");
$("#dialog").di...
In my case I've got a game server, with the CLR threadpool handling the sockets, and a managed threadpool for the other stuff. I'm trying to figure out what the best way to handle events like, an npc casting a spell, or despawning after a set period is.
I could just write some sort of Timer wrapper that gets a new (managed)threadpool t...
I have the following situation
I handle when the left mouse button is pressed in my Silverlight app and do some things while the mouse is held down and the mouse moves. When the left button is released, I turn off the flag that's telling it to do the stuff and the mouse movement handler then no longer does the stuff.
The problem is: if...
I am writing a Facebook app in PHP/FBJS. I have some code where I attach an addEventListener() to two buttons. When I run the app, the first button I click on fires the addEventListener() and the event handler is invoked as expected. But if I click on the second button or click on the same button again, the event handler is not invoked. ...
I have a web page with a table. Using jQuery 1.3.2, I absolutely position a div element over the top of each row on the table. The overlaying div has a higher z-index.
I attach 'mouseenter' and 'mouseleave' events to the overlaying div element. On mouseenter, I throw a red border around the overlaying div. On mouseleave, I remove the bo...
I create a bunch of tags dynamically, appending them to a
I then add a click handler...
$(document).ready(function(){
// ... code to append <a> tags to nav div
$("#nav a").click(function(event){
alert('Clicked '+event.target.id);
return false;
});
});
If I have 10 tags as a result of this and clic...
I have an ImageButton in a GridView.
<asp:GridView ID="ItemGridView" runat="server" DataKeyNames="Id"
OnRowDataBound="ItemGridView_RowDataBound" AllowPaging="True"
AllowSorting="True" EnableSortingAndPagingCallbacks="True"
AutoGenerateEditButton="False" AutoGenerateDeleteButton="false"
DataSourceID="ItemDataSource...
I was wondering if there is a way to observe the system calls in Android using a service... Is something like this remotely possible using Java or do I have to get down into native code...?
Thanks
...
I want my links not to have the weird outline and the best way I found to solve this is have a "null link" to focus on after a click. This works great when defining the onclick method inline the HTML but that is not ideal. I wrote a quick jQuery snippet to do this instead, but I am having trouble getting it to work. Here it is:
<scri...