Context Menu Populate labels - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Context Menu Populate labels

stonesbgstonesbg Posts: 1Member
Hey everyone i want to be able to add a number to a label when they right click on the label they will be given a list of optional numbers. Anyone know how to do this would be greatfull. It is for a sudoku program am developing the user right clicks on a each gridBox(which is a label) then whatever numbers are available to the user will be in this context menu then the user clicks on it and that number will then be populated into the grid hope someone can help out

Comments

  • VanilleBertVanilleBert Posts: 29Member
    : Hey everyone i want to be able to add a number to a label when they right click on the label they will be given a list of optional numbers. Anyone know how to do this would be greatfull. It is for a sudoku program am developing the user right clicks on a each gridBox(which is a label) then whatever numbers are available to the user will be in this context menu then the user clicks on it and that number will then be populated into the grid hope someone can help out
    :

    Hi,

    set the YourLabel.ContextMenuStrip to a ContextMenuStrip containing the possible numbers as Elements. These Elements have a Click event in which you can code YourLabel.Text = XElementX.Text and all should be clear.

    hf with Sudoku,
    Bert
Sign In or Register to comment.