March 7, 200817 yr 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
March 7, 200817 yr 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.
March 7, 200817 yr you may consider this too... http://www.filemakermagazine.com/videos/using-global-graphic-variables.html
March 8, 200817 yr 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, 200817 yr by Guest
March 8, 200817 yr 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, 200817 yr by Guest added file
March 8, 200817 yr 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
March 8, 200817 yr 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, 200817 yr by Guest
March 8, 200817 yr 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 ?
March 8, 200817 yr There's no problem... Only I don't know how to store a graphic into a script parameter... didn't it store only text ?
March 8, 200817 yr It says it should be text, but this works: Perform Script [ “Your Script”; Parameter: YourTable::Containerfield ]
March 8, 200817 yr 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
March 9, 200817 yr Author 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 -)
March 9, 200817 yr 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:
March 9, 200817 yr 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.
Create an account or sign in to comment