3 Replies Latest reply on Aug 25, 2016 8:22 AM by Cécile

    Conditional formating of Tab control


      Grumph.... I've been fussing with  this for an hour last night. What I am trying to do seem simple. How to get what I want to happen.


      I have a Tab control object with 2 tabs.

      I have created 2 styles: HasNote and NoNote

      The first tab is Customer, Second tab Notes.


      When there are no notes, I want the tab name to be displayed normally

      When there are notes, I want the tab to use the style HasNote (which essentially is Highlight Bold Red)

      I made sure to uncheck the "tab share single style" box in the Tab Control settings dialog. (but I tried manually applying just the style HasNote to only one tab: both tabs get the format anyway.)


      On the "conditional formating" dialog, the "value is" option is not available. So I have tried these various formula but none produce the expected result....


      formula is:  If ( IsEmpty (Files::°ConcernsInTheirWords) = 1 ; Replace ( "Notes" ; 1 ; 5 ; "No notes" ) )


      formula is: If ( Files::°ConcernsInTheirWords = "" ; TextStyleAdd ( "Notes"; "NoNotes" ) ; TextStyleAdd ( "Notes"; "HasNote" ) )


      formula is: If ( Files::°ConcernsInTheirWords ≠ "" ; TextColor ( "Notes" ; RGB ( 100 ; 150 ; 200 ) ); TextStyleAdd ( "Notes" ; "default" ) )


      Thanks for your help!

        • 1. Re: Conditional formating of Tab control

          With conditional formats, you need expressions that evaluate as true or False. Then you use the controls in the bottom of the conditional formatting dialog to specify the desired options for what appears when the expression evaluates as true. You can "stack" multiple expressions and specify a different set of formatting options for each to have the same object conditonally format to produce different results for multiple, different values.


          So you might use:

          IsEmpty (Files::ConcernsInTheirWords)

          as your conditional format formula


          and then click on text formatting options to produce the text styles you want to see when that folder is empty.

          1 of 1 people found this helpful
          • 2. Re: Conditional formating of Tab control

            You need to change your tab name as well. It sounds like you have "Notes" as the tab name but you should specify the tab name as

            if(isempty(Files::ConcernsInTheirWords);"No Notes";"Notes")


            This will change the tab name based on the presence of notes. Phil's conditional format formula will allow you to change the color.

            1 of 1 people found this helpful
            • 3. Re: Conditional formating of Tab control

              I did not realized that you meant change the tab name (as in the Tab control dialog....) I thought we were still in the conditional formating place. I figured, given Phils explanation, that the formula you suggested could not work there so I started looking around for places where I could put that script and doing so... I accidently clicked on the TCdialog lol.

              The first time I did it, it did not work because I forgot to click "Rename" before OK. Doh... Can you tell how new I am :-(


              Thank you both for the help!

              I'm so grateful that some talented people take the time to look into things and answer to newbies like me!!!