2 Replies Latest reply on Mar 20, 2017 3:43 PM by kduffy

    Hi guys, its about modifying the occurence of the scrollbars in Processbook Display with VBA

    hkoenig

      I like to switch off and on the scrollbars in a Processbook Display (pdi) with VBA.

      What I Need is a working code example to read and modify the Settings.

      Thanks in advance.

        • Re: Hi guys, its about modifying the occurence of the scrollbars in Processbook Display with VBA
          Asle Frantzen

          Hello Harald

           

          Try using ThisDisplay.SetScrollbars(pbOff, pbOn) inside the Display Open sub.

           

           

          Display SetScrollBars Method

          Applies to

          The SetScrollBars method modifies the settings of the scrollbars in the display in Run mode and Build mode.

          Format

          Sub SetScrollBars(RunMode As pbScrollBarStatus, BuildMode As pbScrollBarStatus)

          Arguments

          RunMode

          PbScrollBarStatus. Sets the scrollbars on or off in run mode.

          BuildMode

          PbScrollBarStatus. Sets the scrollbars on or off in build mode.

          Returns

          Nothing

          2 of 2 people found this helpful
            • Re: Hi guys, its about modifying the occurence of the scrollbars in Processbook Display with VBA
              kduffy

              To close the loop on this question, here's a working example of how to toggle on/off the scroll bars for the display:

               

              Private Sub Text1_Click(ByVal lvarX As Long, ByVal lvarY As Long)
              
              
              Dim pbRunMode As pbScrollBarStatus
              Dim pbBuildMode As pbScrollBarStatus
              
              
              ThisDisplay.GetScrollBars pbRunMode, pbBuildMode
              
              
              If pbRunMode = pbOff Then
                  Call ThisDisplay.SetScrollBars(pbOn, pbOn)
              Else
                  Call ThisDisplay.SetScrollBars(pbOff, pbOn)
              End If
                  
              End Sub
              

               

              To implement this, I made a text box, right clicked on it and selected "Enable scripting", and put the above script into the text box's click event handler.

               

              This is what it looks like to use it. You click the text box and the scroll bars toggle on and off.

               

               

              Kelsey