tabpanel

I have a tab panel with 4 panels
if panel 1 is selected my code does NOT work
if you are on panel 2-3-4 then you can use cmd+LR arrows to move to other panels
it just doesn’t work if you are on panel 1
here is my code
could it be that a control is selected while on panel 1 that makes it not receive the key down command
my code in under event handler of the main window

[code] dim tabval As Integer
tabval = Main_Window.TabPanel1.Value

// right arrow
If keyboard.AsyncOSKey and Keyboard.AsyncKeyDown(124) then //right arrow
//MsgBox Str(tabval)
Main_Window.TabPanel1.Value = tabval +1
end

// left arrow
If keyboard.AsyncOSKey and Keyboard.AsyncKeyDown(123) then //left arrow
//MsgBox Str(tabval)
Main_Window.TabPanel1.Value = tabval -1
end[/code]

my code won’t work because a text field has the focus
if I tab off of the text field and a button, has the focus, then I can cmd+ R arrow to move to other panels
dang, how can you do anything if a text field has focus…

why does XOJO beep when I click cmd+I and I set focus to the text input box

If keyboard.AsyncOSKey and Keyboard.AsynckeyDown(&h22) then input1_proj_code.SetFocus end

You need to “Return True” to tell the KeyDown event that you are handling the keypress, otherwise it will beep.

aaahhhhhh thanks
ding ding ding ding we have a winner