Foxhound is the better* Database Monitor for SQL Anywhere.
*better: More thorough, more relevant, more effective.
...more Alerts, more All Clears, more details, more control in your hands.
|
Breck Carter
Last modified: July 12, 1996
mail to: bcarter@bcarter.com
How do I get rid of the list of open windows that is automatically added to Multiple Document Interface frame and sheet menus? We want to make use of some MDI features but suppress others.
Ask a grizzled veteran "How do I change MDI behaviour?" and you'll often get the answer "Don't do it!" Once upon a time there were two main reasons to avoid fiddling with MDI: Non-standard behaviour tended to confuse the end user, and it just didn't work.
Life is better nowadays, and all those wild and wooly multimedia and Internet applications have made users more tolerant of varying interfaces. It's still difficult to override MDI behaviour, no doubt about it, but at least the GPF Frequency is much lower.
One of the features that comes with MDI is the open sheet list:
This list is usually placed at the bottom of the second-last menu pulldown, and the easiest way to do that is specify zero as the position parameter in the call to OpenSheet:
open ( w_frame ) OpenSheet ( w_sheet_1, w_frame, 0, original! ) OpenSheet ( w_sheet_2, w_frame, 0, original! )
You can't hide the list by making that main menu item invisible: It will just move to another drowdown. But you can disable the main menu item to stop the dropdown from actually appearing. And by shoving the menu item all the way to the right end of them menu bar, and setting its text label to a single space, you can make it effectively disappear.
First, mark the second-last menu item as "Shift Over/Down" to make it
move to the last position:
Then, change the menu text to a single space. This is best done at run-time rather than in the menu painter if you want to avoid GPFs. That's not too much of a burden because the final change must be done at run-time: Append a hexadecimal "08" character in front of the menu text. That causes the menu item to move alllllll the way over to the right edge of the menu bar.
The OpenSheet calls can no longer use the zero default position parameter but must instead specify an exact value. Here's what the what the final code looks like:
open ( w_frame ) m_frame.m_window.text = char ( 8 ) + " " OpenSheet ( w_sheet_1, w_frame, 3, original! ) m_sheet_1.m_window.text = char ( 8 ) + " " OpenSheet ( w_sheet_2, w_frame, 3, original! ) m_sheet_2.m_window.text = char ( 8 ) + " "
The result is almost perfect. The only indication that something is
going on is the disabled blue box that appears if the right-most menu
item gets focus: