I often have several databases going at the same time, each with several of their own windows open. I thought it would be a good idea to have a way to bring all the windows of a selected database to the front when I’m focusing on that particular file. The Window menu has “Bring All to Front” with command-7 as the shortcut. Not exactly what i needed so I wrote a custom Hotkey using command-8 to do the job.
This Hotkey will pop up a list of open databases (including any secret ones) from which to choose. If no choice is made nothing happens. If a visible database is selected then all the associated open windows for that database will be brought forward including forms, procedures and the data sheet. If a secret file is selected it will open the data sheet for that file and make it active (this alone makes it very handy).
definehotkeys "Global", "COMMAND-8", |||let _targetDB="" popupatmouse info("files"),"",_targetDB if _targetDB="" // no file selected stop endif let _dbWindowNames= listwindows(_targetDB) If _dbWindowNames = "" // this is a secret file setactivedatabase _targetDB opensheet stop endif looparray _dbWindowNames,cr(),element,index window element endloop|||
You can place this code in the .Initialize procedure of a file that always opens with Panorama or in your custom Library file - if you have one. This Hotkey will trigger even if you have a procedure window front-most. It would be nice to have this in the Window menu instead of as a Hotkey…
Knowing my track record, Jim might already have a feature like this embedded somewhere I’m not aware of and I’m just reinventing the wheel.