fiveshorts Posted March 7, 2008 Posted March 7, 2008 Hi. I'm trying to work out how to add a 'simple' three-state button to the top of a layout, using a container field with three repetitions. I'm trying to glean the technique from various threads here, but I'm getting nowhere... I've attached a couple of the 'states' as graphics. I assumed I'd be able to call up a repetition with a script attached to an invisible button, but... Any help appreciated
Ocean West Posted March 7, 2008 Posted March 7, 2008 I a not too certain what your trying to accomplish. but you can reference in the repetition by using field[Number] or ContainerField[YourStatusField] this will evaluate to the corresponding image based upon your status field.
Ocean West Posted March 7, 2008 Posted March 7, 2008 you may consider this too... http://www.filemakermagazine.com/videos/using-global-graphic-variables.html
mr_vodka Posted March 8, 2008 Posted March 8, 2008 How about skipping using an image and do it all within FileMaker 9? player.zip
LaRetta Posted March 8, 2008 Posted March 8, 2008 (edited) I like this a lot, John! Also, I know you know this but others might not, instead of attaching the script to the webdings directly, you can place a circle (using the circle tool) over the buttons. Leave the pattern solid so it's easy to place perfectly. Attach the script to it then turn the circle to transparent. It produces a beautiful round button click instead of the standard rectangle (see attached). The effect, test it by holding the button down, is quite pretty! I'm with you - using webdings ROCKS! Hey Stephen, that technique is very valuable! Thank you for pointing it out to us. At one time, I considered if it were possible to store a graphic within a variable like we can store a graphic within a script parameter but I dismissed variables without testing. Very cool! UPDATE: Actually, John did such a great job of matching the original graphic that I didn't see that the circles were his! So you could just attach the script to those circles directly! Wow, John, you are great with graphics - wanna come to work for us? Nah, we couldn't afford you! :laugh2: playerMOD.zip Edited March 8, 2008 by Guest
mr_vodka Posted March 8, 2008 Posted March 8, 2008 (edited) Also, I know you know this but others might not, instead of attaching the script to the webdings directly, you can place a circle (using the circle tool) over the buttons. Leave the pattern solid so it's easy to place perfectly. Attach the script to it then turn the circle to transparent. It produces a beautiful round button click instead of the standard rectangle (see attached). The effect, test it by holding the button down, is quite pretty! I got lazy. :) player_notlazy.zip Edited March 8, 2008 by Guest added file
comment Posted March 8, 2008 Posted March 8, 2008 A little more care is required when aligning the objects (see the Mac screenshot). I wonder how this version looks on Windows. playerAligned.fp7.zip
LaRetta Posted March 8, 2008 Posted March 8, 2008 (edited) Yes, Mac and Windows never line up the fonts. Many times, Michael, the great demos you produce using webdings show them off center as well. Even regular fonts, when viewed on Mac look fine, aren't on Windows - the text boxes are too small and part of the text is cut off the bottom. It is pib when dealing with cross platform issues like this. Yep, your new version is perfect, John - on Windows at least! Edited March 8, 2008 by Guest
Raybaudi Posted March 8, 2008 Posted March 8, 2008 At one time, I considered if it were possible to store a graphic within a variable [color:green]like we can store a graphic within a script parameter ... Please, LaRetta, can you explain how ?
Raybaudi Posted March 8, 2008 Posted March 8, 2008 There's no problem... Only I don't know how to store a graphic into a script parameter... didn't it store only text ?
comment Posted March 8, 2008 Posted March 8, 2008 It says it should be text, but this works: Perform Script [ “Your Script”; Parameter: YourTable::Containerfield ]
LaRetta Posted March 8, 2008 Posted March 8, 2008 Yes, at least on Windows, the picture is as clear as the original. It can save using the clipboard if you want to move something and don't have a relationship (as kittens attached). kittens.zip
fiveshorts Posted March 9, 2008 Author Posted March 9, 2008 Thanks everyone for the insight, but it's obvious I don't know enough about variables or globals etc. so I have to go back to school... I see what you've achieved, but don't understand how it's working. I do appreciate the help, though -)
LaRetta Posted March 9, 2008 Posted March 9, 2008 You were offered many methods. Would you like to tell us which you'd like to use and ask to have it explained in an easy manner? If not, that's okay too. But not understanding is acceptable. And so is asking how something is done. :smile2:
mr_vodka Posted March 9, 2008 Posted March 9, 2008 You are using FileMaker 9, so the conditional formatting feature has been used. A script parameter is passed and then a global variable is set based on it. See if this gets you started. If not, then come back and post specific questions and we'll see if we can help ya further.
Recommended Posts
This topic is 6163 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now