01-30-2006 06:11 PM
01-31-2006 12:09 AM
While it may be deteemined if a panel has been positively made invisible or wether it is THE active panel or not, I'm afraid it's not so easy to calculate if a panel is not completely covered by other panels so that the operator can click on it and activate it. In this latter case if you don't want to explicitly hide it you may need to setup a panel callback that intercepts the "got focus" event and either swallows it (if possible) or makes active the previous active panel (if I'm not wrong one of eventData parameters is the handle of the prevous active panel, so you can SetActive this panel again. You may note the panel being rapidly showed and then obscured again in case the machine is not too fast).
01-31-2006 02:56 AM
After testing it a little I can sat thet unfortunately my solution is not so simple as it could seem. There are a bunch of details that must be observed to make it a minimum functional.
1. Seems that mouse events on a panel cannot be swallowed: you can click on a panel and activate it even if you try to swallow the click
2. EVENT_PANEL_MOVE event is processed only AFTER the panel has been moved. For this reason you must set the panel as not-movable (and maybe not-sizable?) when it must be not-operable
3. Events on the controls are processed BEFORE panel events. That is, you may click on a control and change its state before this event is processed in the panel so you cannot discard it unless you set a global flag of panel operability and test it in every control callback on that panel
Anyway, I prepared a simple project to test this solution and I attach here: maybe can be of some utility in your work.
Roberto