Click here to Skip to main content
15,898,745 members
Home / Discussions / C#
   

C#

 
GeneralRe: Accessing App.Config file Pin
Sha Sea21-Aug-07 10:29
Sha Sea21-Aug-07 10:29 
QuestionInput text function Pin
AndrusM21-Aug-07 6:18
AndrusM21-Aug-07 6:18 
AnswerRe: Input text function Pin
snorkie21-Aug-07 7:15
professionalsnorkie21-Aug-07 7:15 
QuestionHow to Insert User Control into DataGrid Cell ? Pin
ArunkumarSundaravelu21-Aug-07 6:14
ArunkumarSundaravelu21-Aug-07 6:14 
AnswerRe: How to Insert User Control into DataGrid Cell ? Pin
Hessam Jalali21-Aug-07 9:52
Hessam Jalali21-Aug-07 9:52 
GeneralRe: How to Insert User Control into DataGrid Cell ? Pin
ArunkumarSundaravelu22-Aug-07 4:11
ArunkumarSundaravelu22-Aug-07 4:11 
QuestionBindingList based on array Pin
AndrusM21-Aug-07 6:12
AndrusM21-Aug-07 6:12 
Questionbrowse through elemnts of container / subscribe event Pin
ezazazel21-Aug-07 6:11
ezazazel21-Aug-07 6:11 
Good evening!
I would like to add OnClick-events to all button-controls within a form which contains a single split-container. I'll try to explain it:
I have a Windows form which includes one control, a spli-container, which itself has two panels. In one of these there are several buttons. All of them should subscribe to a click-event during initialization process.
I tried it with
[code]
foreach (Control in this.Controls)
{
if (cntr is Button)
{cntr.Click += new EventHandler(delegate(object sender, EventArgs e) {MessageBox.Show(cntr.Name);});}
}
[/code]
but "this.Controls" contains only the split-container.
I know that in this very special example I could as well enumerate through the panels of the split-container, but I would like to use a solution which is independent of the amount of the panels.
I think a possibility is needed, which allows to check if a control contains sub-controls and if so, one of these is a button type control.

Help would be appriciated!
AnswerRe: browse through elemnts of container / subscribe event Pin
Hessam Jalali21-Aug-07 9:03
Hessam Jalali21-Aug-07 9:03 
GeneralRe: browse through elemnts of container / subscribe event Pin
ezazazel21-Aug-07 21:43
ezazazel21-Aug-07 21:43 
QuestionWriting byte stream Pin
gauthee21-Aug-07 5:38
gauthee21-Aug-07 5:38 
AnswerRe: Writing byte stream Pin
Luc Pattyn21-Aug-07 5:48
sitebuilderLuc Pattyn21-Aug-07 5:48 
QuestionThread Synchronization Pin
topksharma198221-Aug-07 4:14
topksharma198221-Aug-07 4:14 
AnswerRe: Thread Synchronization Pin
Luc Pattyn21-Aug-07 5:27
sitebuilderLuc Pattyn21-Aug-07 5:27 
QuestionApplication terminates when window gets closed Pin
MarioMARTIN21-Aug-07 3:59
MarioMARTIN21-Aug-07 3:59 
AnswerRe: Application terminates when window gets closed Pin
MarioMARTIN21-Aug-07 5:07
MarioMARTIN21-Aug-07 5:07 
GeneralRe: Application terminates when window gets closed Pin
Not Active21-Aug-07 5:44
mentorNot Active21-Aug-07 5:44 
GeneralRe: Application terminates when window gets closed Pin
MarioMARTIN21-Aug-07 5:47
MarioMARTIN21-Aug-07 5:47 
GeneralRe: Application terminates when window gets closed Pin
Not Active21-Aug-07 11:03
mentorNot Active21-Aug-07 11:03 
GeneralRe: Application terminates when window gets closed Pin
MarioMARTIN21-Aug-07 19:30
MarioMARTIN21-Aug-07 19:30 
GeneralRe: Application terminates when window gets closed Pin
Not Active22-Aug-07 0:21
mentorNot Active22-Aug-07 0:21 
AnswerRe: Application terminates when window gets closed Pin
Luc Pattyn21-Aug-07 5:52
sitebuilderLuc Pattyn21-Aug-07 5:52 
GeneralRe: Application terminates when window gets closed Pin
MarioMARTIN21-Aug-07 6:00
MarioMARTIN21-Aug-07 6:00 
GeneralRe: Application terminates when window gets closed Pin
Luc Pattyn21-Aug-07 6:23
sitebuilderLuc Pattyn21-Aug-07 6:23 
AnswerRe: Application terminates when window gets closed Pin
MarioMARTIN21-Aug-07 6:19
MarioMARTIN21-Aug-07 6:19 

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.