8 Replies Latest reply on Nov 18, 2011 4:31 PM by dzittin

    Conditional Formatting Bug or Not???

    dzittin

      Title

      Conditional Formatting Bug or Not???

      Post

      I have a script with a simple text line that will appear or not appear based on a condition. All this seems to work. When the condition is false, the text is the background color and all is well. However, when the condition becomes true, only part of the text shows up. When I removed the condition constraint, the entire text block shows.

      Here is the full text:

      (Flash, just discovered the problem.....I think): A script does a resize to fit when I create the window. The text is the background color when the window is created. The text then appears when certain fields are modified. When the condition occurs that triggers the text to appear, it is apparently truncated because it was not included in the resize to fit effort just after window creation. I base this observation on the fact if I manually stretch the window width a little, the entire string appears. I will try to reformat the text to make it work, but shouldn't resize to fit handle this? Or, is there something else I should be using? TIA

      P.S. It's funny that this should be an issue in the case of the string I show above because there is a lot of room for it. Also (another late flash...), if I manually resize vertically and not horizontally, the string is drawn correctly indicating there was plenty of horizontal room for it. Moving the text string around to places on the layout where it will obviously fit yields the same problem.

        • 1. Re: Conditional Formatting Bug or Not???
          philmodjunk

          How about entering layout mode, making a screen capture and then uploading that screen capture?

          If we can see how you have designed your layout, we might get a clue as to what is causing it. You might also select this block of text and check what autosizing anchors are specified for it in the inspector's position tab.

          • 2. Re: Conditional Formatting Bug or Not???
            dzittin

            p1 shows an example of truncated text just above the close button. I reformatted it from a single line to a couple of lines.

            I will put p2 in the next posting and it contains layout details.

            • 3. Re: Conditional Formatting Bug or Not???
              dzittin

              Here is the layout:

              • 4. Re: Conditional Formatting Bug or Not???
                dzittin

                More strange news...I checked the variable that is set to True on a script trigger (when any of the fields on the left are modified). The variable is used in the conditional formatting. The global gets set correctly each time I modify a field (Amt Received, Sales Price, etc.). However, it does not trigger the text to change color (over the close button). Now for the weird part, the script changes the text color when I do the calendar pull down and reset the date. It also changes when I change Galleries which is also a pull down.

                The fields that do not lead to a text change have OnObjectModify scripts and are edit boxes which can receive text input in browse or find mode. At this point, a constructive RTFM with a reference string would be useful. I read the OnObjectModify page and found nothing obvious.

                Incidentally, I tried changing each of the non-pull down fields several times and this did not work. As soon as I change either the Gallery or Date field it does work. The "triggering" global was monitored via the Data Viewer to confirm when it went on/off.

                • 5. Re: Conditional Formatting Bug or Not???
                  philmodjunk

                  This is a refresh window issue. In the script that changes the value of the global variable, include a refresh window step after the set variable step and you should see your conditional format updated more consistently.

                  • 6. Re: Conditional Formatting Bug or Not???
                    philmodjunk

                    Just had another thought: By any chance, does your conditional format apply any text styles such as a specified font or font size? That might explain what you see here. If not, then this is looking more and more like an actual bug...

                    • 7. Re: Conditional Formatting Bug or Not???
                      dzittin

                      If you mean, does it dynamically change styles, the answer is no. The style is hardwired by me using the inspector. It is either background color or black depending on the variable changed via the script trigger.

                      I will try the win refresh as a work around.

                      • 8. Re: Conditional Formatting Bug or Not???
                        dzittin

                        And a few minutes later a report: the refresh window did the trick. I set the variable and did the refresh - all is fine.

                        I guess the pull down (e.g. calendar) damaged the window so that a implicit redraw was done by FM?