February 15, 200421 yr 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??
February 15, 200421 yr 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
February 16, 200421 yr 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?
February 16, 200421 yr 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?
February 16, 200421 yr 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.
February 16, 200421 yr 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.?
February 16, 200421 yr 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.
February 16, 200421 yr Also, if you want to paste anyhing in the container field, make sure it is formatted to allow data entry...
February 17, 200421 yr Author thanks but how do you format the field,container doesnt appear in format list?
February 17, 200421 yr 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...
February 17, 200421 yr You need to go into the menu Format -> Graphic.. and then pick "Crop" image to fit frame, and Alignment: "Center" "Center"
February 19, 200421 yr 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