Jump to content
  • Advertisement
Sign in to follow this  
Zeddan

[.net] Border around button at selection

This topic is 3544 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

Hi there! I am working on a Mastermind game currently and need to implement functionality for displaying an explicit graphical "boundary" around a button when it is selected and removing the boundary when the button is deselected. I also would like to be able to use the buttons that have been selected in the game while excluding those that are not selected. That is, the user should be able to choose which colors that are to be used for each instance of the game. Do you have any suggestions on what I can do to solve this problem without using global variables? Thanks in advance!

Share this post


Link to post
Share on other sites
Advertisement
First part.


button1.FlatStyle = FlatStyle.Flat;

private void button1_Click(object sender, EventArgs e)
{

if (button1.FlatAppearance.BorderSize < 2)
{
button1.FlatAppearance.BorderSize = 3;
}
else
{
button1.FlatAppearance.BorderSize = 1;
}
}



The form should be able to handle the button section things.

theTroll

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!