I want to create a 9x9 grid for a sudoku program I'm making. I've got a randomly generated set of numbers stored in sudoku. some will be a number between 1 and 9, others will be an empty value. What I need is a 9x9 grid which has the following properties:
- Each cell corresponds to a number in the sudoku array, so if sudoku is 7, the top left-hand box will be 7.
- The ones with no value can be written in - but only one digit and only a number between 1 and 9.
- If you press 'enter' after writing the digit, the number will be transfered to the corresponding array slot
- However you can still go back and change them
I think I can do 3., and 4. probably comes with 2. So I just want to know how to do 1. and 2..