In this context my impulse would be to subclass the calendar control and add
a click handler that is wired up to both buttons.  But I've not tried
anything like this except with my own user controls.  If you don't have the
source to the calendar and the buttons of interest are not exposed as Friend
(or internal in C# parlance) then you would be out of luck, at least for
that approach.  Offhand I can't think of another angle -- and I'm sort of
swamped this morning.  Anyone else?

--Bob

----- Original Message -----
From: "Lude Gullit" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 12, 2004 10:32 AM
Subject: [C#.NET] Re: Get the name of the clicked button


>
>
> But I will assign the date to the textbox in the following sub which
> the sender name is calender not button. I want to know which button
> is clicked
>
> Private Sub cal1_SelectionChanged(ByVal sender As System.Object,
> ByVal e As System.EventArgs) Handles
> calDateRangeStart.SelectionChanged
>
> end sub
> --- In [EMAIL PROTECTED], "Bob Grommes" <[EMAIL PROTECTED]> wrote:
>> The sender argument to the Click handler will be a reference to
> the clicked
>> button, you would just examine the sender's Name property.
>>
>> --Bob
>>
>> ----- Original Message -----
>> From: "Lude Gullit" <[EMAIL PROTECTED]>
>> To: <[EMAIL PROTECTED]>
>> Sent: Friday, November 12, 2004 10:01 AM
>> Subject: [C#.NET] Get the name of the clicked button
>>
>>
>> >
>> >
>> > Hi,
>> >
>> > I have two textboxs - txt1 and txt2- and two buttons-btn1 and
> btn2-
>> > and a calendar-cal1.
>> >
>> > I want to realize this function: if i click btn1, the selected
> date
>> > will appear on to the txt1; and if i click btn2, the selected
> date
>> > will appear on to the txt2. My problem is how can I know which
>> > button is clicked? Thanks
>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>


Yahoo! Groups Sponsor
ADVERTISEMENT
click here
Web Bug from http://us.adserver.yahoo.com/l?M=298184.5584357.6650215.3001176/D=groups/S=:HM/A=2426682/rand=602555367


Yahoo! Groups Links

Reply via email to