Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

graphic display on button press?

Featured Replies

Hi, total newbie here, im trying to put a graphic in my database that is also a button,when i click it i would like it to show another graphic in its place that when clicked will return to the original graphic??

If you mean that you want to toggle the graphic back and forth each time you click on it, it's quite easy to do with a simple script and a few fields. See the attached sample file.

ClickGraphic.fp5.zip

  • Author

Ok get that,but doesn't work ,so im guessing im defining the button wrong,is the container the button? how do i get the graphics into the container? tried copy,paste

Really hard to find the basics of containers anywhere?

  • Author

also when i pull the field gGraphics from the field list it only has one repetition?, I have made a button and assigned the script but when i press it the graphic state toggle between 0 and 1 but no graphics,i think its defining the graphics into the container that i am doing wrong?

Sorry, I wasn't very clear on the details. The field cDisplayGraphic is used as the button. It displays either repetition 1 or 2 from the global container field gGraphics depending on the value of field GraphicState. Place the field cDisplayGraphic on your layout and size it as required, and then, with it selected, pick "Button" from the format menu, and assign the script "ToggleGraphic" to it.

  • Author

ok but still no idea how to get graphics into containers? tried copy and paste and they just sit on top,tried grouping them that doesnt work either,no explanations anywhere on containers,wondering why filemaker dont explain this anywhere in there own docs. also when i take the container with 2 repetitions from field list,just one rep.????

Copy graphic from Layout mode. Paste into container in Browse mode.

For multiple repetitions, format the field to show X of X repetitions. This applies to all repeating field types, not just containers.

Also, if you want to paste anyhing in the container field, make sure it is formatted to allow data entry...

  • Author

thanks but how do you format the field,container doesnt appear in format list?

  • Author

Brilliant,just one more thing,how do i precisely set the container size so the graphic appears at original size,tried manually resizing container but its not accurate enough?

thanks 4 all the help guys...

You need to go into the menu Format -> Graphic.. and then pick "Crop" image to fit frame, and Alignment: "Center" "Center"

Show Object size while working on GUI.....enter the same value as the image size eg. 100x200px; temo fill the field with some color (like soft green) to see where your image is alligned in the field etc.

although you SHOULD save the images as Bob said u CAN use the Graphics format to yout advanatage where "distortion" or "enlargement" is THE way to go.

See attachement!

All the best!

STORE_IMG.zip

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.