I need create shapes (other than circles and squares) and use them as buttons. Is this possible? If so, what is the best way to do it?
Yes, not that you really need to.
You can select nearly any layout object while in layout mode and then use Button Setup from the Format menu to turn it into a button. I use that method to turn fields into buttons.
But you can also add a button object to your layout and use the inspector to specify an image for it. You can even specify different images for different button states.
And finally, you can select an icon for the button and it is also possible for some graphics to be imported into the file to be used as an icon.
Well I know that any layout object can be specified as a button but my concern is the shape of the object. Say for example, how would you draw a triangle and turn it into a button that fires when you click anywhere inside the triangle but not anywhere outside of the triangle? I can group 3 lines to make the triangle but unless the cursor is over one of the lines, it won't fire as a button. Know what I mean? That's why I'm thinking to insert or paste a graphic object and then specify it as a button. I assume that if a graphic is imported as a icon, it has to be a raster image, not a vector image...right? Can you import a vector image as a layout object?
To repeat, nearly ANY layout object can be turned into a button. If you insert a graphic into the layout, you can then turn it into a button. I used to insert png files for this purpose as I could get a transparent back ground. When working with FMP 13 as I often do, I now insert png files as a button image via the inspector.
Icons should be svg which is a specific vectored image. But it's tricky, I've tried any number of times to import an icon that I found on the web that was of the correct type only to find it unable to scale correctly as a FileMaker icon. Stripping out "fill" information to make it something that you can specify a fill color for can also be a pain.
FMP's SVG description is at https://fmhelp.filemaker.com/docs/15/en/svg/. I've found that it's easiest to get things working properly by copying the SVG files embedded with FMP app.
Check out this youtube video (references a great little utility for setting up svg files into a Filemaker friendly format).
FileMaker 14 SVG Icon Helper - Rev 2 | Free FileMaker 14 Training - YouTube
Which is of limited help if you are trying to figure out if a third party produce svg icon is or is not "FileMaker Friendly", I wasn't trying to create my own, but use some that I found that would have been perfect for a product that I was working on at the time.
That's precisely what the utility app does. It takes SVGs (I have downloaded several free from websites as well) that Filemaker doesn't like because it doesn't have the right "fmpfill" attibute, and automatically changes the xml to include the attributes Filemaker needs. Then you can copy and paste onto your layout and the new svg icon is automatically loaded into your icon palette.
Does it fix an icon that doesn't scale correctly? that's been the main source of irritation when I've worked with them.
I am not sure if it addresses that or not. I'd have to watch the video again to be sure. I've only used it to get the fill color to work. But it exposes the original xml code and the altered code, which you could further manipulate to get the right scale.
When I have had scaling problems, I use an inexpensive ($30) app called Graphic Graphic on the Mac App Store.
But Illustrator or Photoshop would obviously work as well. Just export the file at a scaled down size. Filemaker recommends 256x256 for png. I forget the recommended size for SVG.
Also see FileMaker 14 SVG Icon Helper Tool
This might be of interest but is only for OS X:
1) Design a button using Keynote.
2) Copy the button / icon.
3) Open Preview, then: insert New From Clipboard.
4) Export as png (with alpha).
5) in FM, Insert Picture.
6) Format as desired with Inspector.
7) The use Button Setup.
Note: The Button always has a rectangular shape embedded with what ever was designed, like a triangle, or ….
at point 4 you can "Save" as PNG rather than export.
at point 5 you can create a button or button bar button and import the PNG to the icon library, making it available to all other buttons.
With regards to the png method, been doing that in windows for a long time. Used to use nothing more sophisticated than windows paint, then discovered paint.net--which can produce PNG's withtransparent backgrounds. I often drop a "ding bat" type character on the screen, scale it, maybe add flash of color and then save as a PNG. I even use one image for normal and another for hover so that the image changes when you hover the mouse as more creative way to show that the button is an object that can be clicked than just having the cursor change into a hand.
I've websearched the tool mentioned earlier. Didn't spend a lot of time at it, but I could only find the video. A site claimed to offer it didn't have a link to click for a download--maybe you have to register first, those some info to that effect would have been helpful.
Here is the link to the file on FM Starting Point: FM Starting Point - Market
Last item at the bottom of the page -- It's literally three squares down from your own "Bug Database" ;-)
This is a pretty good article / blog on custom buttons:
The inDats Icon Manger is the FileMaker solution.
Retrieving data ...