Ocean West

tip
Single Segment Button - Layout level Calculations

5 posts in this topic

You can also style a single segment button bar as a button that does nothing with a calculation for the label, then style it to match a field or text on the layout and use it for layout level calculations with out the need to add a calculation to the schema.

Edited by Ocean West
3 people like this

Share this post


Link to post
Share on other sites

Wow!  That's a great tip.  Thanks, Stephen.

Share this post


Link to post
Share on other sites

In a case of great minds think almost alike, Daniel Wood has come up with the idea of using Placeholder Text to provide layout-level calculations.  Two approaches where previously we had none!  

I could see advantages to either:  The button-bar method allows state-responsive styling (e.g., on hover, etc.), whereas Placeholder Text is its own state and thus can't respond to mouse-over, etc.  You could also incorporate an icon.  On the other hand, an empty global field with calculated placeholder text—you'd only need one such field in the file, potentially tucked away in a utility table—can be easily styled using your existing edit box styles (although similar styles could be defined for the button bar, of course).  Both approaches clearly demonstrate how a little bit of lateral thinking can get us places we previously couldn't go.

Mark

1 person likes this

Share this post


Link to post
Share on other sites

I must say I like this button bar implementation,  given it's on a button it will work with conditional formatting (which placeholder text does not) and the icon too is a bonus, very cool!

Share this post


Link to post
Share on other sites

Here's what I've been using since Jeremy Bante pointed out that using the Hide calc with local vars is a pretty cool combo!

Single Object.png

2 people like this

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Similar Content

    • By docasar
      Hello,
      It always go to "Default segment button bar", set on the button bar setting, when reenter to layout.  I need to go to same segment when user was working on before he left the layout.
      I know how to get back to last tab panel used, and I wonder if there would be similar for this.
      Thanks a lot!
      Luis.
    • By fabriceN
      As you know, FileMaker 14 included a new widely used feature: button bars. No need to say why they're awesome, but you've probably noticed it wasn't that easy if you wanted to create a lot of similar buttons, or convert your old button objects into button bars.
      Well, these are not issues anymore, thank's to Federico Basmadyian's ButtonBarTool, available here.

       
    • By Mark Scott
      If you're looking for the "Script Workspace Secrets and Tips" thread, it's been moved over here.  ;-)
      Meanwhile, share your first impressions of Script Workspace right here.
      Mark
    • By LaRetta
      It was mentioned here  FileMaker Weetbicks blog that Dylan wanted the icon spacing NOT to adjust if an icon was hidden - so I figured others might want this same functionality.  I do not know the 'trick' which is referenced but there are two ways to do it that I have figured.  In the attached example, switch between form and list view (which is what is used to hide a few of the regular icons).    If you wish NOT to have the gaps, just move all the invisible icons to the end of the button bar.  I was unclear on specifically what Dylan wanted in that regard.  
      The second set uses a single empty icon for each 'real' icon which shows when its assigned icon is hidden, using GetLayoutObjectAttribute.  My purpose in object-naming the 'empty' icons is so that they could all be put at the end as well (and it is easy to remember which 'real icon' it references) and it still should adjust the same way (but untested).
      The second method, instead of hiding the icon, is using conditional formatting on it.  
      Anyway, I hope it spurs others' ideas as well  This is rough and it is very late..  :-)
       
       
      Adjustable_bar2.fmp12.zip