Uploaded image for project: 'GMAT'
  1. GMAT
  2. GMT-2978

Script editor horizontal scroll bar not working properly

    Details

      Description

      Two issues with the horizontal scroll bar in the script editor:

      1. The scroll bar extends to the right beyond the actual margin of the text.
      2. In a script with a long line, the scroll bar doesn't go all the way to the end of the text. You need to hold down the right scroll button to get all the way to the end.

      See the attached screenshots for evidence.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            shughes Steven Hughes added a comment -

            CCB: P2 R2013a.

            Show
            shughes Steven Hughes added a comment - CCB: P2 R2013a.
            Hide
            tgrubb Thomas Grubb added a comment -

            It appears that this bug is hard to fix efficiently using our current version of wxwidgets and the wxStyledTextCtrl. The current code tries to SetScrollWidth in the OnSize event. However, it uses the GetClientSize method which has nothing to do with the size of the lines.

            In wxWidgets 2.9 there is a SetScrollWidthTracking method (Exposed from scintilla) which should do what we want.

            For now, I have changed OnSize to iterate through the entire document finding the TextWidth of the longest line assuming no style (if we ever allow font size changes, this code will not work)

            Show
            tgrubb Thomas Grubb added a comment - It appears that this bug is hard to fix efficiently using our current version of wxwidgets and the wxStyledTextCtrl. The current code tries to SetScrollWidth in the OnSize event. However, it uses the GetClientSize method which has nothing to do with the size of the lines. In wxWidgets 2.9 there is a SetScrollWidthTracking method (Exposed from scintilla) which should do what we want. For now, I have changed OnSize to iterate through the entire document finding the TextWidth of the longest line assuming no style (if we ever allow font size changes, this code will not work)
            Hide
            tgrubb Thomas Grubb added a comment -

            Fix is in build 2012-11-02

            Show
            tgrubb Thomas Grubb added a comment - Fix is in build 2012-11-02
            Hide
            jjkparker Joel Parker added a comment -

            Verified as fixed using 2013-02-12 build. Assigning to Tom for any followup GUI testing.

            Show
            jjkparker Joel Parker added a comment - Verified as fixed using 2013-02-12 build. Assigning to Tom for any followup GUI testing.

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: