RE: How can I make a field ready to receive typing?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Here are the results of your suggestions on my Win2000 SP4 system:

Suggestion 1:
Remove setFocus from Open_Win2 and add:
procedure Activate_Win2(integer self, integer event, sequence parms)
    setFocus(Text21)
end procedure
setHandler(Win2, w32HActivate, routine_id("Activate_Win2"))

Result:  The password field does get focus, because one TAB takes me to=
 Text22, however the password field does not open for input.  No cursor.=
  Typing does not appear in the window (or anywhere else).  Both windows=
 are visible and when the password window is closed, the initial focus=
 window is fully exposed and has not changed size.

Suggestion 2:
Change openDialog to OpenWindow

Result:  Works in the simple example, but in the real application execution=
 proceeds beyond the OpenWindow and I loose control - the code immediately=
 following gets run without waiting for the PW window to close, but I can=
 move that code somewhere else.

Suggestion 3:
Put the main window off screen initially.

That's real cute.  I never would have thought of that; I would have=
 supposed it would result in an error.  What I have been doing is to place=
 the password window exactly on top of the main window, but the user can=
 move the password window and expose it.

Suggestion 4:
Make the password window modal.

Good point.  Maybe not necessary if the main window is off screen, but=
 still a good idea.

Comment by Derek:
    Here's how it works for me:
    1. Password text field is highlighted upon start.
    2. When password dialog is dismissed, main screen comes in at position=
 0,0
     and size 300,300 as defined.

Do you mean that the main window is not visible until the password window=
 is closed?  On my system they both appear at the outset with the password=
 window in front of the main window.

Suggestion 5:
procedure MyWin_onActivate (integer self, integer event, sequence
params)--params is ()

I understand that the onXXX functions should not be used for new code.=
  They also kill the setHandler statements.

-------------

This has been really educational.  I hope others have learned as much as I=
 have.  I'm not closing the discussion, but I think I have learned enough=
 to make my application work the way I want.  Although there is a practical=
 need for the program I am writing, I am also doing it for fun.  I have=
 been known to rip out perfectly good code and replace it with something=
 that is more elegant or beautiful when I learn more.  Thanks, guys.

Louis.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu