mhrappstead Posted November 30, 2006 Posted November 30, 2006 (edited) Yo, I am going to college and I am making a tic tac toe game for one of my assinments. Here is my problem I want to be able to click a button and on click be able to change the focus toward a text box this is the code I am using presently: txtBox.focus() Hint: This code works as long as my button and text box are not in a group box, but in this situation the text box and the button are both in the same group box. Edited November 30, 2006 by mhrappstead Quote
Leaders snarfblam Posted November 30, 2006 Leaders Posted November 30, 2006 I can't reproduce the problem. I tried putting both in a group box, one or the other in the group box, both directly on the form, both in different group boxes, and it worked every time. Quote [sIGPIC]e[/sIGPIC]
mhrappstead Posted December 1, 2006 Author Posted December 1, 2006 (edited) Marble_eater is there a specific code you need to add when trying to focus inside a groupbox Edited December 1, 2006 by mhrappstead Quote
Leaders snarfblam Posted December 2, 2006 Leaders Posted December 2, 2006 I simply used the focus method of the control I wanted to give focus to. Quote [sIGPIC]e[/sIGPIC]
mhrappstead Posted December 4, 2006 Author Posted December 4, 2006 Thanks I'll try messing around with it Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.