Moving Focus from one checkbox to another

Ok I am creating a number of checkboxes in a window. What do I need to
do to make it so the focus goes to the next checkbox when the tab key is
hit.

rID = wxNewId()
rb1= wxCheckBox(self, rID, "", wxPoint(418, 30), wxSize(20, 20),
wxNO_BORDER)
rb2= wxCheckBox(self, rID+1, "", wxPoint(418, 55), wxSize(20, 20),
wxNO_BORDER)
rb3= wxCheckBox(self, rID+2, "", wxPoint(418, 80), wxSize(20, 20),
wxNO_BORDER)
rb4= wxCheckBox(self, rID+3, "", wxPoint(418, 105), wxSize(20, 20),
wxNO_BORDER)
rb5= wxCheckBox(self, rID+4, "", wxPoint(418, 130), wxSize(20, 20),
wxNO_BORDER)
rb6= wxCheckBox(self, rID+5, "", wxPoint(418, 155), wxSize(20, 20),
wxNO_BORDER)

Ok I am creating a number of checkboxes in a window. What do I need to
do to make it so the focus goes to the next checkbox when the tab key is
hit.

From memory, I think it's as simple as adding wxTAB_TRAVERSAL to the style

parameter of the window or panel that contains the checkboxes.

David

Mike Wagman wrote:

Ok I am creating a number of checkboxes in a window. What do I need to
do to make it so the focus goes to the next checkbox when the tab key is
hit.

If you put all of your checkboxes on a wxPanel, the panel should handle tab traversal for you automatically.

Jeff Shannon
Technician/Programmer
Credit International

Mike Wagman wrote:

Ok I am creating a number of checkboxes in a window. What do I need to
do to make it so the focus goes to the next checkbox when the tab key is
hit.

Put them on a wxPanel.

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!