Article # 390, added by Geoworks, historical record
| first |
previous |
index |
next |
last |
Getting the item in a list with the focus.
Q. How do I fetch the number of a current item, the one marked with a dot line rectangle, in a non-exclusive dynamic list? None of the GenItemGroupClass messages seem to get it. A. The item marked with a "dot line rectangle" is actually the focus item. You can use a message to get the current focus item, but this is generally a bad idea because the focus may change between message calls. That is, the "dot line rectangle" is only an intermediate state, like when you're dragging the mouse over a menu before selecting one of the items. It's OK for those items to react in some way, but for another object to query and then act is asking for timing trouble. If you need to act when the dot line rectangle moves to another item, the best thing to do is to have the item intercept MSG_META_GAINED_FOCUS_EXCL and send some custom notification message to the object that's interested in the state.