Click here to Skip to main content
15,925,181 members
Home / Discussions / C#
   

C#

 
GeneralRe: MessageBox Pin
Nick Seng25-May-04 21:09
Nick Seng25-May-04 21:09 
GeneralRe: MessageBox Pin
MilesAhead26-May-04 4:13
MilesAhead26-May-04 4:13 
GeneralCompiling code Pin
Wizard_0125-May-04 20:40
Wizard_0125-May-04 20:40 
GeneralRe: Compiling code Pin
Marc Clifton26-May-04 3:34
mvaMarc Clifton26-May-04 3:34 
GeneralCustom Control Pin
Ryan Joseph25-May-04 19:46
Ryan Joseph25-May-04 19:46 
GeneralRe: Custom Control Pin
Stefan Troschuetz26-May-04 0:44
Stefan Troschuetz26-May-04 0:44 
GeneralRe: Custom Control Pin
Ryan Joseph26-May-04 15:17
Ryan Joseph26-May-04 15:17 
GeneralRe: Custom Control Pin
Stefan Troschuetz26-May-04 21:25
Stefan Troschuetz26-May-04 21:25 
Yeah, I thought you do something like this. Just wanted to be sure Smile | :)

To expose events of your TextBox without making custom events, you could subscribe your Control to the TextBox events and inside the event handler raise the appropiate event of your Control. If you want to expose some specific TextBox events you will have to declare custom events.
<br />
class Custom : UserControl<br />
{<br />
TextBox textBox1;<br />
<br />
public Custom()<br />
{<br />
textBox1 = new TextBox();<br />
textBox.TextChanged += new System.EventHandler(Custom_TextChanged);<br />
}<br />
<br />
void Custom_TextChanged(object sender, System.EventArgs e)<br />
{<br />
this.OnTextChanged(EventArgs.Empty);<br />
}<br />
}<br />

To hide some events of your UserControl you have the redeclare them with a stricter access modifier like private or protected.
<br />
private new event System.EventHandler SizeChanged;<br />


Hope this helps!
GeneralRe: Custom Control Pin
Ryan Joseph27-May-04 16:11
Ryan Joseph27-May-04 16:11 
GeneralRe: Custom Control Pin
Stefan Troschuetz27-May-04 21:05
Stefan Troschuetz27-May-04 21:05 
GeneralRe: Custom Control Pin
Heath Stewart26-May-04 4:09
protectorHeath Stewart26-May-04 4:09 
GeneralCalender control in asp.net Pin
HowRU25-May-04 18:14
HowRU25-May-04 18:14 
GeneralRe: Calender control in asp.net Pin
Aryadip25-May-04 19:28
Aryadip25-May-04 19:28 
GeneralRe: Calender control in asp.net Pin
HowRU25-May-04 20:17
HowRU25-May-04 20:17 
GeneralC# windows app Pin
Anthony_Yio25-May-04 17:56
Anthony_Yio25-May-04 17:56 
GeneralRe: C# windows app Pin
Nick Seng25-May-04 19:00
Nick Seng25-May-04 19:00 
GeneralRe: C# windows app Pin
Anthony_Yio25-May-04 20:05
Anthony_Yio25-May-04 20:05 
GeneralRe: C# windows app Pin
Nick Seng25-May-04 20:07
Nick Seng25-May-04 20:07 
GeneralRe: C# windows app Pin
Anthony_Yio25-May-04 20:16
Anthony_Yio25-May-04 20:16 
GeneralRe: C# windows app Pin
Nick Seng25-May-04 20:21
Nick Seng25-May-04 20:21 
GeneralRe: C# windows app Pin
Anthony_Yio25-May-04 20:35
Anthony_Yio25-May-04 20:35 
GeneralRe: C# windows app Pin
Anthony_Yio25-May-04 20:45
Anthony_Yio25-May-04 20:45 
GeneralRe: C# windows app Pin
Dave Kreskowiak26-May-04 2:48
mveDave Kreskowiak26-May-04 2:48 
GeneralRe: C# windows app Pin
Heath Stewart26-May-04 4:19
protectorHeath Stewart26-May-04 4:19 
GeneralRe: C# windows app Pin
Anthony_Yio26-May-04 15:33
Anthony_Yio26-May-04 15:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.