"verticalScrollBarPolicy" / "vScrollBarMode"

The attribute "verticalScrollBarPolicy" sets the vertical scroll bar mode of an object e.g. of a textEdit, a tree widget or a table. (Until Version 3.10 "vScrollBarMode")

Synopsis

setValue(string shape, "verticalScrollBarPolicy",stringscMode);

getValue( string shape, "verticalScrollBarPolicy",string &ScMode);

shape.verticalScrollBarPolicy(stringscMode);

Parameter

Parameter Description
shape Name of the object
scMode

The scroll bar mode

Possible modes for verticalScrollBarPolicy:

  • "ScrollBarAsNeeded" (vertical scroll bar is automatically shown if the text cannot be displayed in the visible area) Default mode.

  • "ScrollBarAlwaysOff" (horizontal scroll bar is never displayed)

  • "ScrollBarAlwaysOn" (horizontal scroll bar is always shown)

Possible modes for hScrollBarMode:

  • "Auto" (horizontal scroll bar is automatically shown if the text cannot be displayed in the visible area) Default mode.

  • "AlwaysOff" (horizontal scroll bar is never displayed)

  • "AlwaysOn" (horizontal scroll bar is always shown)

Description

The attribute "verticalScrollBarPolicy" sets the vertical scroll bar mode of an object e.g. of a textEdit, a tree widget or a table.

Example

In the following example the vertical scroll bar mode of a textEdit is set to "AlwaysOn".

main(bool enter)
{
  string sn = "TEXT_EDIT1";
  string scrM = "AlwaysOn";
  string scV;
  this.verticalScrollBarPolicy(scrM);
  getValue(sn,"verticalScrollBarPolicy",scV);
  DebugN("Scroll bar mode",scV);
}

Assignment

TextEdit, Table, Tree widget, DpTreeView