New Custom Button Generator

A short while ago Jim gave a link on Bitbucket to a web page ( where you could generate custom buttons and get them as jpeg files for use in your forms. I thought it might be nice to actually build custom buttons directly within Panorama X. That being said, here is my rendition of a Pan X custom button generator.

The custom button generated is comprised of three objects. The main object actually serves as the button with title and is an Image Display Object which is surrounded by a hollow Rounded Rectangle which acts as the border. The final object is another (but filled) Rounded Rectangle object underneath the other two that is used to create the shadow if requested.


•	Change the button height and width in real time
•	Change the title name, font, font size and color
•	Adjust the title offset to center vertically in button
•	Set the button color and choose solid or gradient
•	Ability to include a FontAwesome or Emoji icon in title
•	Multi-line titles can be created by adjusting the button width
•	Select a rounded or square border or no border at all
•	Change the border color and stroke size
•	Can include a fully adjustable button shadow
•	Stock procedure code to flash button on button release
•	Ability to edit and add your own additional code to procedure
•	Ability to check procedure for syntax errors
•	When generating your new button you can select the destination form
•	Generated button is created on that form and selected in graphics mode
•	Generated buttons are assigned random names to avoid duplicates

Create all kinds of custom buttons to spruce up your forms. As noted above you can control almost every aspect of your creation to suit your taste and your needs. Most of the controls operate in real time so you can see the adjustments as they are being made. The three objects comprising the button will be created on your chosen form and be selected as your form is automatically brought forward into graphics mode. At that point you can move the three selected objects in unison to their final position on your form. I do not recommend grouping these objects as they will go wonky when clicked. The border object will also be sent backward in the object order for some reason. Too bad since that would be the ideal way to keep them all together.

Icons can be chosen from the FontAwesome or Emoji popup menu buttons or from the Font Awesome Icons option in the Help menu or the Emojis & Symbols option in the Edit menu. With the Font Awesome Icons window you can select the icon you want and then highlight and copy it from the Icon pane and paste it into the title text box. Using the Emojis & Symbols dialog you choose the icon you want and double click it to enter it into the active title entry box. Note that with the emoji option you can enter a return after the emoji and it will place the icon directly above the title text (this trick does not work with FontAwesome icons).

Here is the Custom Button Generator transferring a custom button to a form in another open database:

The Custom Button Generator is free and can be downloaded at:


You never cease to amaze. Excellent idea and program.


Jeff Kozuch
President, Acacia Systems
Panorama Programming and Training
Apple Certified Technical Coordinator
Member, Apple Consultants Network

Why thanks Jeff, it is really encouraging to get some positive feedback.:grin:

That’s really clever Gary!

Of course I had to tear it apart to see how it works :slight_smile:

I had thought about eventually adding a gradient button built-in to Panorama X. If anything, this probably encourages me to do that now that I see how nice it looks. It probably will be a while until I get to that, in the meantime, this is very cool. Chapeau!

Another great production from Gary - very impressive and it satisfies a need I have right now.

It also raises another issue which is something of a hobby horse of mine - we need somewhere to store this sort of adjunct to Panorama X and make it a part of the package. Gary has written lots of useful add-ons like this, I’ve written stuff like the Crosstab Emulator, Number Cruncher and Excel formatter, Dave Thompson has contributed literally hundreds of really useful code snippets and the list goes on.

Some of the above contributions get picked up at the time of publication and then they disappear from sight. They should sit in a highly visible toy box and be continuously available. It doesn’t have to be a highly sophisticated Wiki page - a folder on a server or in the Cloud would do, as long as people can get the address.

IMHO the Panorama Database Exchange would be a perfect place.

You only have to provide an URL to a zip-compressed Pan X database on (e.g.) Dropbox – just like you have done before. But you would not only post the URL here in the forum, but enter it in the Panorama Database Exchange, too.

I agree. Unfortunately, there are some problems with the Panorama Database Exchange at the moment. I kind of built it around Dropbox, and Dropbox no longer allows web sharing of items in your Dropbox folder. So at the moment I’m scratching my head a bit about how to replace that functionality. Also, I never did set it up so that third parties could add items to the Exchange.

Bottom line, the Panorama Database Exchange needs some major work. I may even temporarily remove it from the Help menu.

I had in mind something simpler, like a folder in the cloud. Anybody could drop files into it but only you (or even one or two of us if it became time-consuming) could access those files, check them for adequate documentation, confirm that they perform as advertised and then move them to another location where they would be available for download.

But maybe that’s just describing your proposed Database Exchange in a different way and the same problems arise.

Just a thought - go ahead and shoot it down (sobs quietly).

OR …

A sticky forum topic containing a collection of posts like Gary’s - no discussion, just the authors’ presentations.

Gary, I want to add my 2 cents that this is brilliant. However, I’m having a couple of issues. I am constructing a vertical button (which is handled very nicely) with the label text characters separated by Return key, to make the text read upright, top to bottom. For some reason, the last (bottom) character gets truncated off, seems no matter what size font and how much room is left. In some cases this happens as I am constructing it, but sometimes the label is OK in your generator but loses the character upon transfer to the destination form. I’d be curious is anyone can duplicate this and/or find a cause.

The other thing is that the resulting button is actually 3 objects on top of each other in close alignment, and after it is transferred I find it too easy to click-drag only the top object around, and on an already densely populated form it can be an adventure to put it all back together. I was going to suggest using a “Group” action on this pile of objects before the transfer so it can be dealt with as a single object on the destination form, but then I read your explanation why not. Would it work as intended if you could transfer it as a Group object, but then the user can UnGroup it once it’s in place and it would work without issue?

There’s a lot going on under the hood here…

You can try adding another return character before your string and another extra return after your string to see if that is more stable. We are pushing the envelope here you know.

It seems that grouping and ungrouping these objects causes some problems down the line so I definitely advise against it. I find the three objects pretty easy to move around as long as they are all selected when moved just by clicking and dragging in the center. I originally wanted to group them for the reasons you indicated but remembered that there is no programmatic statement to do this. After finding out how weird things got after grouping it became a moot point.

Actually, I found that adding some character to the end did the trick, doesn’t matter what character because it just won’t show, but the previously last one does. Couldn’t say why, but consistent so far. The adjustment you provide to keep it centered works swell.

I have been finding that too. The button kinda corrupts itself and then it’s broken. I’ll have to see how this fits with what I have.

That’s how stuff gets done!