[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 344
  • Last Modified:

PictureBox Selection?

I'm working on a card program that gives the user the ability to select different decks.  I'm going to display the decks using pictureboxes.  I would like it so that when a user clicks on a deck, there is some form of outline so they know which deck is currently selected.  Then, based on that selection, when they click OK, it passes a variable back to the original form to indicate which deck was selected.  Does anyone know an easy way to do this or can it only be done using a radio button?
0
DragXSlay
Asked:
DragXSlay
  • 2
3 Solutions
 
armoghanCommented:
One way could be to use Buttons instead of PictureBoxes. It can be shown selected easily. and on focus the image can also change
0
 
armoghanCommented:
0
 
TheAvengerCommented:
Change the BorderStyle property of the picture boxes. E.g. None for not selected and FixedSingle for selected
0
 
Farshid-ZakerCommented:
First, you should programmatically provide the behavious of Radio Button Group to your cards group. It's your own job!
Second, as TheAvenger said, you can use the followind code:

pictureBox.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
pictureBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;// Or None

<Farshid/>
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now