Array of Text Boxes
Posted: Monday 15th November 2021 4:35pm
Hello,
I have just started with Gambas3 and decided to write a Suduko program as a way of learning the language. I have some questions about how the design the GUI:
I need an array of 9x9 textboxes to capture the users input. I have found a example of how to create such an array within a program but I can't see how to set the edits. If I add the 81 boxes to the form at the design stage I can use the group property to capture the keypress event to ensure the user can only input single numbers between 1 and 9. Is there a way of adding a group property if they are created by the program?
Also the keypress event is good at ensuring only 1 - 9 gets input but I also need it to respond to tab, del, and up and down arrow input. Not sure how to do this?
Finally, (sorry for all the questions) what is the best way of adding lines to the form to surround and go between the text boxes?
Many thanks for suggestions
I have just started with Gambas3 and decided to write a Suduko program as a way of learning the language. I have some questions about how the design the GUI:
I need an array of 9x9 textboxes to capture the users input. I have found a example of how to create such an array within a program but I can't see how to set the edits. If I add the 81 boxes to the form at the design stage I can use the group property to capture the keypress event to ensure the user can only input single numbers between 1 and 9. Is there a way of adding a group property if they are created by the program?
Also the keypress event is good at ensuring only 1 - 9 gets input but I also need it to respond to tab, del, and up and down arrow input. Not sure how to do this?
Finally, (sorry for all the questions) what is the best way of adding lines to the form to surround and go between the text boxes?
Many thanks for suggestions