How do I build an array of buttons in a Winforms application?
What I am trying to do is this: I have a lot of buttons in a sort of calendar arrangement, that are indicating time slots. IE: Monday0700Button, Monday0730Button, Monday0800Button, and so on in 30min intervals.
I have a xml database, where one of the fields for appointments is <Duration>
When the duration = 0.5hrs, and the <Time>
field equals "07:00am", to color the 'Monday0700Button'. When the Duration is 1.0hrs, I want it to populate 'Monday0700Button' as well as the following time slot button of 'Monday0730Button'.
Any ideas? Thanks.
Two options. Great, now that Visual Studio Community is installed, you have two options for developing and running C programs on Windows. The first option involves using any text editor you like to write your source code, and using the "cl" command within the Developer Command Prompt to compile your code.
Yes, you can build a list of buttons like below.
List<Button> listOfButtons = new List<Button>();
listOfButtons.Add(yourButton);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With