4 Replies Latest reply on Feb 10, 2016 7:37 AM by doubleHelix

    Active and Alternate row formatting for Table View

    JohnDee

      Title

      Active and Alternate row formatting for Table View

      Post

           I am having a really hard time implementing active row and alternate row state colours in fmp in table view. I ‘ve read quite a bit on it, documentation, blogs, threads here etc. (whatever there is to read, which of course isn’t much), but I am not having much lack. I am getting the basics right setting colors via the insperctor for primary, active and alternate and then I select one option for my body, either one, so far so good… then nothing works at best I get one coloured line at the end and the rest of the layout in table view where there is not text is coloured.

            

           I read somewhere that transparency might be an issue, I am not sure I ‘ve figured this out, but I ‘ve used light colours with it. In any case if anyone can be…well… a bit more transparent on what fm expects me to do, I ‘d be very happy. :)

            

           (p.s. In addition when I ‘ve selected an option for active or alternate state rows via the body dialog box, and then I right click on the left of the table view I get “alternate state row locked) (or active locked as the case might be). The way I understand this is that the option to change a colour is locked. Then why is it giving me the option to select a colour (but not a custom one)? This option is not available really and I guess it shouldn’t be choosable, that’s bad ui design, imho.)

        • 1. Re: Active and Alternate row formatting for Table View
          philmodjunk

               Do you have the Delineate check box selected in Layout Setup...?

          • 2. Re: Active and Alternate row formatting for Table View
            JohnDee

                 I did, I turned it off and I am still getting the same behaviour.

            • 3. Re: Active and Alternate row formatting for Table View
              philmodjunk

                   I successfully ran the following test using FileMaker 13 in Windows 7. See if you can spot where it differs from what you did:

                   Enter layout mode

                   Double click the Body part label to open part set up.

                   Select the Use Alternate Row State option

                   Click Ok to close the dialog

                   With the body part label still selected, go to the appearance tab of the inspector and select "Primary" from the 2nd drop down at the top of this tab. Select a fill color for what you want for the primary row. Then Select "Alternate" from the drop down and select a contrasting fill color for the alternate row.

                   Save changes, return to browse mode and view your layout with table view specified.

                   This produced a table view with the rows alternating in color as I specified as shown in the attached screen shot.

              • 4. Re: Active and Alternate row formatting for Table View
                doubleHelix

                For alternate row coloring to work in Table view, follow philmodjunk's steps above, but you must also change the fill of all your fields to none so that they are transparentThis fixes alternate row coloring in Table view but not active row coloring.

                 

                Active row coloring in Table view requires a workaround.  Create an OnRecordLoad script trigger to set a global field with your unique ID field.  Then set conditional formatting for all your fields to change the fill color when the ID field equals the global field.