hphantom
18th January 2012 23:16 UTC
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!
gfm688
19th January 2012 01:54 UTC
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
gfm688
19th January 2012 01:58 UTC
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
hphantom
19th January 2012 17:33 UTC
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.
gfm688
20th January 2012 13:33 UTC
after nsWindow::Show, and You should EnableWindow $HWNDPARENT 0
When the popup window close, EnableWindow $HWNDPARENT 1