DisplayScrollBars Property (ActiveX)

Specifies whether to display scroll bars at the bottom and right sides of the drawing window.

Supported platforms: Windows only

Signature

VBA:

object.DisplayScrollBars
object

Type: PreferencesDisplay

The object this property applies to.

Property Value

Read-only: No

Type: Boolean

Remarks

The initial value for this property is False.

Examples

VBA:

Sub Example_DisplayScrollBars()
    ' This example returns the current setting of
    ' DisplayScrollBars. It then changes the value, and finally
    ' it resets the value back to the original setting.
    
    Dim preferences As AcadPreferences
    Dim currDisplayScrollBars As Boolean
    
    Set preferences = ThisDrawing.Application.Preferences
    
    ' Retrieve the current DisplayScrollBars value
    currDisplayScrollBars = preferences.Display.DisplayScrollBars
    MsgBox "The current value for DisplayScrollBars is " & preferences.DISPLAY.DisplayScrollBars, vbInformation, "DisplayScrollBars Example"
    
    ' Change the value for DisplayScrollBars
    preferences.DISPLAY.DisplayScrollBars = Not (currDisplayScrollBars)
    MsgBox "The new value for DisplayScrollBars is " & preferences.DISPLAY.DisplayScrollBars, vbInformation, "DisplayScrollBars Example"
    
    ' Reset DisplayScrollBars to its original value
    preferences.DISPLAY.DisplayScrollBars = currDisplayScrollBars
    MsgBox "The DisplayScrollBars value is reset to " & preferences.DISPLAY.DisplayScrollBars, vbInformation, "DisplayScrollBars Example"
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_DisplayScrollBars()
    ;; This example returns the current setting of
    ;; DisplayScrollBars. It then changes the value, and finally
    ;; it resets the value back to the original setting.
    (setq acadObj (vlax-get-acad-object))
    (setq preferences (vla-get-Preferences acadObj))
    
    ;; Get the Display preferences object
    (setq ACADPref (vla-get-Display preferences))

    ;; Retrieve the current DisplayScrollBars value
    (setq currDisplayScrollBars (vla-get-DisplayScrollBars ACADPref))
    (alert (strcat "The current value for DisplayScrollBars is " (if (= currDisplayScrollBars :vlax-true) "True" "False")))
    
    ;; Change the value for DisplayScrollBars
    (setq newValue (if (= currDisplayScrollBars :vlax-true) :vlax-false :vlax-true))
    (vla-put-DisplayScrollBars ACADPref newValue)
    (alert (strcat "The new value for DisplayScrollBars is " (if (= newValue :vlax-true) "True" "False")))
    
    ;; Reset DisplayScrollBars to its original value
    (vla-put-DisplayScrollBars ACADPref currDisplayScrollBars)
    (alert (strcat "The DisplayScrollBars value is reset to " (if (= currDisplayScrollBars :vlax-true) "True" "False")))
)