Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Calling Events on Standard Controls Programmatically
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
mrscorpion@gmail.com  
View profile  
 More options Jun 9 2008, 3:22 am
From: "mrscorp...@gmail.com" <MrScorp...@gmail.com>
Date: Mon, 9 Jun 2008 00:22:45 -0700 (PDT)
Local: Mon, Jun 9 2008 3:22 am
Subject: Calling Events on Standard Controls Programmatically
Hi All,

I want to know, if there is any way to raise an event of a standard
control programmatically. Scenario is that I want to raise the click
event of a button control upon changing the text of a text box
control. How can I do that?

Thanks in Advance.
Happy Programming!
Adeel.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew Badera  
View profile  
 More options Jun 9 2008, 1:27 pm
From: "Andrew Badera" <and...@badera.us>
Date: Mon, 9 Jun 2008 13:27:31 -0400
Local: Mon, Jun 9 2008 1:27 pm
Subject: Re: [DotNetDevelopment] Calling Events on Standard Controls Programmatically

Just call the handler and pass it the appropriate references. Yes, it really
is just that easy.

On Mon, Jun 9, 2008 at 3:22 AM, mrscorp...@gmail.com <MrScorp...@gmail.com>
wrote:

> Hi All,

> I want to know, if there is any way to raise an event of a standard
> control programmatically. Scenario is that I want to raise the click
> event of a button control upon changing the text of a text box
> control. How can I do that?

> Thanks in Advance.
> Happy Programming!
> Adeel.

--
--
--Andy Badera
http://higherefficiency.net
http://flipbitsnotburgers.blogspot.com/
http://andrew.badera.us/
http://changeroundup.com/
and...@badera.us
(518) 641-1280
Google me: http://www.google.com/search?q=andrew+badera

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Glenn  
View profile  
 More options Jun 9 2008, 1:28 pm
From: Glenn <ke4ktza...@gmail.com>
Date: Mon, 9 Jun 2008 10:28:37 -0700 (PDT)
Local: Mon, Jun 9 2008 1:28 pm
Subject: Re: Calling Events on Standard Controls Programmatically
Simply call your event handler that you've set up for the button.

...Glenn

On Jun 9, 3:22 am, "mrscorp...@gmail.com" <MrScorp...@gmail.com>
wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mrscorpion@gmail.com  
View profile  
 More options Jun 10 2008, 3:26 am
From: "mrscorp...@gmail.com" <MrScorp...@gmail.com>
Date: Tue, 10 Jun 2008 00:26:11 -0700 (PDT)
Local: Tues, Jun 10 2008 3:26 am
Subject: Re: Calling Events on Standard Controls Programmatically
Hi,

Thanks for your response. It was kind of you.
But call to the handler is not raising event. My statement was I want
to raise event i.e. button automatically calls handler once I raise
event on that button. Just wondering if it is possible to raise events
on the controls.

I feel my example previously was not good enough to make it clear as
to what exactly i want. Let me explain the exact scenario as to why I
need raising event.
I have developed a custom button control which is derived from Control
class. My control fires click event upon clicking but I also want to
fire click event when user presses enter or space key on that
control.
Currently I have solved my problem by implementing my own event
ButtonClick, which I fire each time when someone clicks or presses
space or enter key. But I don't want two events like Click or
ButtonClick, I just want one event and that is Click event, which is
the already there in Control class. How to fire that event of that
super class upon keypress?

Thanks in Advance.
Happy Programming!
Adeel.

On Jun 9, 10:27 pm, "Andrew Badera" <and...@badera.us> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew Badera  
View profile  
 More options Jun 10 2008, 2:19 pm
From: "Andrew Badera" <and...@badera.us>
Date: Tue, 10 Jun 2008 14:19:21 -0400
Local: Tues, Jun 10 2008 2:19 pm
Subject: Re: [DotNetDevelopment] Re: Calling Events on Standard Controls Programmatically

Just register multiple handlers with said event.

On Tue, Jun 10, 2008 at 3:26 AM, mrscorp...@gmail.com <MrScorp...@gmail.com>
wrote:

--
--
--Andy Badera
http://higherefficiency.net
http://flipbitsnotburgers.blogspot.com/
http://andrew.badera.us/
http://changeroundup.com/
and...@badera.us
(518) 641-1280
Google me: http://www.google.com/search?q=andrew+badera

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Glenn  
View profile  
 More options Jun 11 2008, 9:32 am
From: Glenn <ke4ktza...@gmail.com>
Date: Wed, 11 Jun 2008 09:32:41 -0400
Local: Wed, Jun 11 2008 9:32 am
Subject: Re: [DotNetDevelopment] Re: Calling Events on Standard Controls Programmatically

If you have a custom class based on the Control class, then the event that
is triggered is for your class, not the Control class.  You can, however,
call the base class' event handler as part of your event handler.

After you implement the processing you want, simply register the event
handler for all the events you want to execute that code.

...Glenn

On 6/10/08, mrscorp...@gmail.com <MrScorp...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adeel  
View profile  
 More options Jun 11 2008, 12:52 pm
From: Adeel <mrscorp...@gmail.com>
Date: Wed, 11 Jun 2008 21:52:46 +0500
Local: Wed, Jun 11 2008 12:52 pm
Subject: Re: [DotNetDevelopment] Re: Calling Events on Standard Controls Programmatically

Hi,

First of all thank you for your input.
What you are suggesting is to register a handler with event. That will only
execute the code I've written in the handler while implementing that control
but will not raise the click event on my custom control i.e. the code
written by user of the control in the click event handler  at design time
will not be called, because handler is being called whenever click event is
raised, but my problem is to raise event upon key press and that click event
handler code written by the user of the control at design time should also
run upon that key press.

But my problem is solved now. I just wanted to share how I solved the
problem so it maybe helpful for others as well.

I called the OnClick method of the Control class to raise click event upon
keypress i.e. upon pressing enter or space when control is in focus. This
way click event is raised for the control so that the click event handler
written by the user of the control at design time is also executed each time
some one presses space bar or enter key when this control is in focus, not
just the handler which is written inside the implementation of control.

I hope I've made my point clear.

Thank you all for your input.
Happy Programming!
Adeel.

On Wed, Jun 11, 2008 at 6:32 PM, Glenn <ke4ktza...@gmail.com> wrote:

If you have a custom class based on the Control class, then the event that


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google