Jump to content
  • Advertisement
Sign in to follow this  
Quat

[.net] grid of buttons

This topic is 3788 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I need to write a custom control that renders a grid of buttons (sort of like the ChooseColor dialog). Here's a screenshot of what I am after: link Basically, every element stores two buttons. I'm not sure how to get the "sunken" look of an element (the little box containing two elements). Also, there will be about 500 buttons. Should I create 500 Button objects, or just handle the logic myself? Finally, I noticed I can use a Panel with the Fixed3D border to get the sunken look. But creating a panel for every two buttons does not seem like the way to go, since the panel is only being used for cosmetics. Please advise.

Share this post


Link to post
Share on other sites
Advertisement
Maybe don't create 500 button but consider having a scroll bar next to the visible buttons. For example if these buttons are color swatches, then you could have 8 of them, when you move the vertical scroll bar it can change the color of each button using an array of 500 colors rather than an array of 500 buttons. Buttons can also have a Flatstyle property with Flat, Popup, Standard or System visual styles.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!