Click here to Skip to main content
15,887,485 members
Home / Discussions / C#
   

C#

 
GeneralRe: 2 projects 1 class Pin
David Stone24-Jul-03 10:51
sitebuilderDavid Stone24-Jul-03 10:51 
GeneralRe: 2 projects 1 class Pin
albean24-Jul-03 11:06
albean24-Jul-03 11:06 
GeneralRe: 2 projects 1 class Pin
Daniel Turini24-Jul-03 11:13
Daniel Turini24-Jul-03 11:13 
GeneralRe: 2 projects 1 class Pin
David Stone24-Jul-03 11:46
sitebuilderDavid Stone24-Jul-03 11:46 
GeneralRe: 2 projects 1 class Pin
albean25-Jul-03 9:19
albean25-Jul-03 9:19 
Generalaccessing controls through a collection Pin
Rbledwards24-Jul-03 10:44
Rbledwards24-Jul-03 10:44 
GeneralRe: accessing controls through a collection Pin
Furty24-Jul-03 15:15
Furty24-Jul-03 15:15 
GeneralRe: accessing controls through a collection Pin
LongRange.Shooter29-Jul-03 8:35
LongRange.Shooter29-Jul-03 8:35 
In addition to Furty's response...

If you have a collection of controls you can either populate them at
design-time (which leads to code like you've got) or you can programmatically add them yourself.

Try this:

Create a new project and put a GroupBox on the form
Add a single control to that GroupBox
Look at the Windows Generated code.

Now you have a template for what YOU would do, since the logic is adding a single control to the Control collection. Rip out the Windows generated code and make it a programmatic loop to add each control. Now --- if you have an event like having an item selected, point it to a single routine in your build code. If it is necessary to know which control from top to bottom was selected, you can interate through the Control collection until you find that control, and that becomes the index for populating the corresponding control in the other groupbox.

The beauty of reusability!

_____________________________________________
The world is a dangerous place.
Not because of those that do evil,
    but because of those who look on and do nothing.

GeneralThread.Sleep is too slow Pin
eggie524-Jul-03 10:26
eggie524-Jul-03 10:26 
GeneralRe: Thread.Sleep is too slow Pin
albean24-Jul-03 10:30
albean24-Jul-03 10:30 
GeneralRe: Thread.Sleep is too slow Pin
eggie524-Jul-03 11:35
eggie524-Jul-03 11:35 
GeneralRe: Thread.Sleep is too slow Pin
albean24-Jul-03 14:26
albean24-Jul-03 14:26 
GeneralRe: Thread.Sleep is too slow Pin
eggie524-Jul-03 17:36
eggie524-Jul-03 17:36 
GeneralRe: Thread.Sleep is too slow Pin
albean25-Jul-03 9:09
albean25-Jul-03 9:09 
GeneralRe: Thread.Sleep is too slow Pin
eggie525-Jul-03 16:54
eggie525-Jul-03 16:54 
GeneralRe: Thread.Sleep is too slow Pin
LongRange.Shooter25-Jul-03 10:39
LongRange.Shooter25-Jul-03 10:39 
GeneralRe: Thread.Sleep is too slow Pin
Daniel Turini24-Jul-03 11:15
Daniel Turini24-Jul-03 11:15 
GeneralRe: Thread.Sleep is too slow Pin
eggie524-Jul-03 11:33
eggie524-Jul-03 11:33 
GeneralRe: Thread.Sleep is too slow Pin
jparsons24-Jul-03 15:02
jparsons24-Jul-03 15:02 
GeneralCan't Distribute C# Console App. Pin
Dato24-Jul-03 7:27
Dato24-Jul-03 7:27 
GeneralRe: Can't Distribute C# Console App. Pin
Daniel Turini24-Jul-03 8:12
Daniel Turini24-Jul-03 8:12 
GeneralRe: Can't Distribute C# Console App. Pin
Dato24-Jul-03 11:56
Dato24-Jul-03 11:56 
GeneralRe: Can't Distribute C# Console App. Pin
Anonymous24-Jul-03 16:12
Anonymous24-Jul-03 16:12 
GeneralRe: Can't Distribute C# Console App. Pin
Dato25-Jul-03 11:31
Dato25-Jul-03 11:31 
Generaldouble buffering direct draw in a windowed application Pin
pseudonym6724-Jul-03 7:08
pseudonym6724-Jul-03 7:08 

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.