Article # 619, added by Geoworks, historical record
| first |
previous |
index |
next |
last |
Keeping the focus object visible in a scrolling GenView.
Q. If I've got a GenView/GenContent pair set up to contain several generic objects, I have to intercept MSG_META_KBD_CHAR and manually set the focus to the next object if the user presses the Tab key. For some reason, when tabbing to an object that is not visible the view will not always scroll to make it visible. The same is true when intercepting a Shift-Tab and calling MSG_GEN_NAVIGATE_TO_PREVIOUS_FIELD. What am I doing wrong? How do I get the tab key to make the item visible when it gets the focus? And using the cursor up/down keys for object navigation seems pretty inconsistent about making objects visible. It seems that both cursor up/down and my manual Tab key handling do almost the same thing. A. Handling the Tab key presses shouldn't be necessary. Gen objects in GEOS already use the Tab key for navigation, even in a GenView. Make sure that the GenContent object has the hint HINT_CONTENT_KEEP_FOCUS_VISIBLE, which will scroll the view whenever the focus changes.