On 4/9/06 3:34 PM, "Robert Lobsinger" <[EMAIL PROTECTED]> wrote:
>
>>> I have tried setting the selected button to .default in the window
>>> keydown
>>> event, with no Return/Enter key result either.
>>
>> This works for me (OS 10.4.5, same versions of RB).
>>
>
> Michael -
>
> Thanks. So how are you determining which button has been tab-selected? I've
> tried setting a boolean to true in button.gotfocus to identify that
> particular button in the window keydown event. No luck.
>
> Robert
>
Sorry, should have said something about that given that I don't see the
GotFocus and LostFocus events firing. (The LR does state that the GotFocus
and LostFocus events are for Windows and Linux.)
In the KeyDown event handler use an if-end if block such as...
if asc(key)=9 then
if pMyFocusedControl = 1 then
PushButton1.Default=false
PushButton2.Default=true
pMyFocusedControl = 2
elseif pMyFocusedControl = 2 then
PushButton2.Default=false
PushButton3.Default=true
pMyFocusedControl = 3
elseif pMyFocusedControl = 3 then
PushButton3.Default=false
PushButton1.Default=true
pMyFocusedControl = 1
end if
end if
where pMyFocusedControl is an integer property of the parent window.
Depending on your intent, you could possibly use a control array of
PushButtons.
Michael
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>