I have a feeling this isn't possible in C#.
In Delphi, when you define event handlers in a base class form, you can
choose them in the properties window on your descendant forms.
As an example, consider a TopClassForm that has a NumericKeyPress event
handler that handles the KeyPress event of a text box and allows numeric
characters only. Any form you inherit from TopClassForm (again, in Delphi),
can then choose NumericKeyPress directly in the Object Inspector (Properties
Window) of any text box on the screen.
Is this possible in C#, or do I have to code it by hand?
TIA,
Mike Rodriguez 2 1116
If the event is public, you should see it in the designer. Does the base
class define both the delegate and the event, or just the delegate? In order
for it to show up in the designer, the event must be defined and public.
"Michael Rodriguez" wrote: I have a feeling this isn't possible in C#.
In Delphi, when you define event handlers in a base class form, you can choose them in the properties window on your descendant forms.
As an example, consider a TopClassForm that has a NumericKeyPress event handler that handles the KeyPress event of a text box and allows numeric characters only. Any form you inherit from TopClassForm (again, in Delphi), can then choose NumericKeyPress directly in the Object Inspector (Properties Window) of any text box on the screen.
Is this possible in C#, or do I have to code it by hand?
TIA,
Mike Rodriguez
hi,
it should be accesible if you declared it as protected or public.
Now regarding being displayed in the Properties windows, I dont remember but
I think it will not be.
You can access it from code though.
cheers,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Michael Rodriguez" <mi**@nospamforme.com> wrote in message
news:eT**************@TK2MSFTNGP09.phx.gbl... I have a feeling this isn't possible in C#.
In Delphi, when you define event handlers in a base class form, you can choose them in the properties window on your descendant forms.
As an example, consider a TopClassForm that has a NumericKeyPress event handler that handles the KeyPress event of a text box and allows numeric characters only. Any form you inherit from TopClassForm (again, in Delphi), can then choose NumericKeyPress directly in the Object Inspector (Properties Window) of any text box on the screen.
Is this possible in C#, or do I have to code it by hand?
TIA,
Mike Rodriguez
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: delerious |
last post by:
I have a DIV that contains some links. I have an onmouseout event handler on
the DIV, and I want it triggered only when the mouse leaves the DIV. Since
there are Anchors in the DIV, onmouseout...
|
by: Poewood |
last post by:
Okay here are four classes for a pocket pc program: Input, fpositional,
ComboBoxArray and TextBoxArray. The "input" class is the form. I use the
fpositional class to handle most of the functions...
|
by: Adam |
last post by:
In Winforms, in Visual Studio, how does one add multiple event handlers
in the properties box for let's say, a textbox TextChanged event?
Thanks in advance.
Adam
|
by: Sushil Srivastava |
last post by:
Hi Guys,
Would you be able to help me using C# GUI (with user interface component) in
my MFC application. I have used managed extension, COM-interops, etc but
problem is this C# component has...
|
by: Rob Richardson |
last post by:
Greetings!
I am working on an application that targets a Pocket PC running Windows CE
and SQL Server CE. Almost all functions in the application use a Try block
with a Catch block that looks...
|
by: Benny Raymond |
last post by:
I understand that you would normally want to raise an event on the same
thread so that your code blocks until the event has been dealt with...
however i've run into a situation where I have a...
|
by: Bruce HS |
last post by:
When I raise an event in an ancestor, the event fires first in the ancestor,
then its descendant, and then in the descendant's descendant.
I would like the descendant's descendant to fire first...
|
by: khalid galal |
last post by:
Hi, i am having a problem with removing event handlers, it is when creating nested event handlers (an event handler raising another event handler) where a part of the code is
private void...
|
by: Lila Godel |
last post by:
My VB.NET 2008 application is setup with a Sub Main and no forms. At run
time a NotifyIcon is created with one context menu choice (Close which
terminates app).
I have no trouble running the...
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |