Archive: nsWindows and tabs


nsWindows and tabs
Hi everyone,

Am using nsWindows for a custom popup window, and am wondering how can I get the text fields to tab to the next one? (The actual tabbing, on the keyboard, not like a browser tab). It does occur in nsDialogs, but I couldn't find where the code goes (or remove) to actually get nsWindows to do the same thing?

Thanks!


Use IsDialogMessage in the Message Loop

System::Call "*(i, i, i, i, i, i, i) i.R0"
MsgLoop:
IsWindow $hWindow 0 MsgLoopEnd
System::Call User32::GetMessage(iR0,i,i0,i0)
System::Call User32::IsDialogMessage(i$hWindow,iR0)i.R1
StrCmp $R1 0 0 MsgLoop
System::Call User32::TranslateMessage(iR0)
System::Call User32::DispatchMessage(iR0)
Goto MsgLoop
MsgLoopEnd:
System::Free $R0


Use IsDialogMessage to processes the keyboard messages in the message loop

System::Call "*(i, i, i, i, i, i, i) i.R0"
MsgLoop:
IsWindow $hWindow 0 MsgLoopEnd
System::Call User32::GetMessage(iR0,i,i0,i0)
System::Call User32::IsDialogMessage(i$hWindow,iR0)i.R1
StrCmp $R1 0 0 MsgLoop
System::Call User32::TranslateMessage(iR0)
System::Call User32::DispatchMessage(iR0)
Goto MsgLoop
MsgLoopEnd:
System::Free $R0


Silly question, where would I put it? I tried in its' entirety (within the nsWindow), as a separate function/call, and in the .onInit, but that would either not work or crash the entire window.


after nsWindow::Show, and You should EnableWindow $HWNDPARENT 0

When the popup window close, EnableWindow $HWNDPARENT 1