Graphics mode button - useless for users

I would suggest that the Graphics Mode button in the Tool Bar Automatically disappear when logged in to a Mode where the user is restricted from Modifying the design, or using the Standard UI (which is how I set it up for normal users, and imagine this is fairly common). It seems silly to have a button there that just throws a “Not Authorized” message. I would also suggest that the “Remove” button disappear for the same reason.

OR, for my wish-list, could we somehow add the Toolbar setup to the preferences that get set in a Link generated from the Preferences dialog? That would be perfect!

Yes, I am now searching for how to programmatically customize the toolbar, as I thought I saw it somewhere, so I can hopefully adjust it automatically for my users. Is it in the Help ?

Obviously not a high priority, maybe something to think about in the future.

The closest that you’ll find is

setdatabaseoptions "","DataSheetWindowOptions","notoolbar"

Search Help for NoToolBar or NoScroll and you’ll find a few ways in which to use them. What they don’t do is allow you control over what tools appear if the Tool Bar is displayed. You can set - and save- it manually by using Customize Toolbar in the standard Windows menu.

Panorama X uses Apple’s standard NSToolbar class to implement it’s toolbars. This ensures that the tool bars work in the standard way just like all other macOS apps that provide toolbars.

Unfortunately, the NSToolbar class does not provide dynamic customization of the type you are requesting. None of what you are asking for is possible with the NSToolbar class. Apple hasn’t significantly changed the NSToolbar class in over 15 years, so I don’t think this capability will ever be available.

My suggestion would be completely turn off the toolbar and make your own row of buttons across the top of your form. Of course that won’t really look and work like a standard toolbar, which is my point. You can have standard toolbar operation, or full dynamic control over the arrangement of the toolbar, but you can’t have both in a macOS application.

Prefix: With PanX, maybe this idea is a moot point.

One thought on custom toolbars: if you go through the trouble of creating them, consider taking a little extra time and also add a secret way of bringing back the standard tools - like some entering some key combination at startup. Or having a Flash or StartUp screen and if you click on the usual place/button, it simply closes; but if you click in a special area, it closes and then opens the files with all design tools/options available.

Several times I have had to work on abandoned files (the original owner moved away, sometimes to a celestial location) where the original designer locked up the toolbar. I have to use the Form Wizard and WindowTweak to get into graphics mode and from there I can open other windows and have the options I need to do what needs to be done.

But what if I looked in a .Initialize procedure and there in comments was a nice description saying, "To open in full development mode, start with … . " Instruction for you, or whoever works on your files later, to put the files back in “fix it; modify it” mode.

That way you can lock away all the options that would get the users into mischief, and, when necessary, also open the file with full design options.

If I understand Jim correctly, you can have “the standard” toolbar or a custom toolbar. And though you can’t have both, You can make a custom toolbar that has all the standard tools in it. So your “dynamic” is to have a “designer’s” toolbar and a “Users” toolbar and have an easy way - known only to you and a few close friends - of starting the database in “tinkering” mode or user mode.

First off is that Jim’s work around is only for forms since the data sheet will not allow for adding anything below the normal toolbar or title bar if there is no tool bar. Second is the Show/Hide Toolbar item in the Window menu that can toggle the tool bar on and off. Third is that even if there is no tool bar for a form you can force the form into graphics mode using the escape key.

Note also that if you use the Window menu to force the toolbar on and off it will only affect the active form. If, however, you use the option-command-T menu shortcut to hide or show the toolbar it will affect all the open forms from that database. In the data sheet if you use the Window menu Show Toolbar item (the Window menu for the datasheet always only has Show Toolbar but it will still toggle the toolbar on and off) only the datasheet for the active database is affected. If you use the menu shortcut it affects all the open datasheets from all the open files.