home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zephyr.ens.tek.com!vice!bobb
- From: bobb@vice.ICO.TEK.COM (Robert Beauchaine)
- Newsgroups: comp.lang.pascal
- Subject: TV Focus in Dialog views
- Message-ID: <10202@vice.ICO.TEK.COM>
- Date: 20 Aug 92 16:54:57 GMT
- Organization: Tektronix Inc., Beaverton, Or.
- Lines: 30
-
-
- Here's the problem:
-
- I'm attempting to trap loss of focus events in Turbo Vision among
- views within a dialog box. I want to validate my numerical input
- lines whenever the user moves off the focused input, either via
- the keyboard or mouse.
-
- I can trap a view's loss of focus by overriding the SetState()
- method and looking for an sfFocused bit combined with a false
- Enable. The problem with this scheme is that SetState() is
- ignorant of what event is causing the change in focus. If I close
- the dialog box with a cmCancel, SetState() is still called, and
- the input line attempts to validate itself even though the user
- does not care about the value.
-
- Keyboard events are not a problem, since they are automatically
- routed to the focused event and can be handled by HandleEvent().
- The positional events are where I'm getting hung.
-
- Suggestions?
-
- /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
-
- Bob Beauchaine bobb@vice.ICO.TEK.COM
-
- C: The language that combines the power of assembly language with the
- flexibility of assembly language.
-
- Real friends don't let friends use UNIX.
-