# TXRulerBar Control

> Ruler bar control for a TX Text Control ActiveX editor that sets indents, tabs and the alignment of table cells: Direction, ScaleUnits, FormulaMode and events.

- **Product:** TX Text Control ActiveX
- **Section:** Documentation
- **Kind:** Class
- **Path:** TX Text Control ActiveX > API Reference > TXRulerBar Control
- **656 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/llms-full.txt

---

A TXRulerBar control represents a ruler bar for a Text Control. It can be used to set paragraph attributes like indents and tabulators and the horizontal alignment of table cells.

### Syntax

```vbscript
TXRulerBar
```

### Members

#### Properties

| Property | Description |
|---|---|
| [Appearance](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/appearance-property/llms-full.txt) | Returns or sets the paint style of a ruler bar. |
| [BorderStyle](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/borderstyle-property/llms-full.txt) | Returns or sets the border style for a ruler bar. |
| [Direction](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/direction-property/llms-full.txt) | Gets or sets a value specifying the direction of the ruler bar in the document. |
| [DisplayColor](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/displaycolor-property/llms-full.txt) | This property gets or sets the display colors of a ruler bar. |
| [Enabled](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/enabled-property/llms-full.txt) | Returns or sets a value that determines whether a ruler bar can respond to user-generated events. |
| [EnablePageMargins](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/enablepagemargins-property/llms-full.txt) | Enables or disables the setting of page margins. |
| [FormulaMode](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/formulamode-property/llms-full.txt) | Gets or sets a value specifying whether the ruler bar shows cell references when the current input position is in a table cell. |
| [hWnd](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/hwnd-property/llms-full.txt) | Returns a handle to a ruler bar. |
| [Language](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/language-property/llms-full.txt) | Determines the language in which resources are displayed. |
| [ReadOnly](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/readonly-property/llms-full.txt) | Returns or sets a value determining the ruler bar's read only mode. |
| [ResourceFile](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/resourcefile-property/llms-full.txt) | Returns or sets the file name of a resource library which are loaded to display resources. |
| [RightToLeft](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/righttoleft-property/llms-full.txt) | Returns or sets a value specifying whether the ruler bar has its origin at the right or at the left border. |
| [ScaleUnits](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/scaleunits-property/llms-full.txt) | Returns or sets the scale units for the ruler. |

#### Events

| Event | Description |
|---|---|
| [MouseDown](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/mousedown-event/llms-full.txt) | Occurs when the user presses a mouse button. |
| [MouseMove](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/mousemove-event/llms-full.txt) | Occurs when the user moves the mouse. |
| [MouseUp](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/mouseup-event/llms-full.txt) | Occurs when the user releases a mouse button. |

### See Also

- [Programming Category: Tool Bars](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/toolbars/llms-full.txt)

---

## In This Section

- [Appearance Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/appearance-property/llms-full.txt): Returns or sets the paint style of a TXRulerBar: txFlat, tx3D (default), txXP for the Windows XP look or txColorScheme with the system color scheme.
- [BorderStyle Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/borderstyle-property/llms-full.txt): Returns or sets the border style of a TXRulerBar as an Integer: 0 for no border or 1 for a fixed single border around the ruler bar window.
- [Direction Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/direction-property/llms-full.txt): Gets or sets whether a TXRulerBar is shown as a horizontal ruler (txHorizontal, the default) or as a vertical ruler (txVertical) beside the document.
- [DisplayColor Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/displaycolor-property/llms-full.txt): Gets or sets the display colors of a TXRulerBar by RulerBarColor index, from rlForeColor to rlRulerColor, used when Appearance is set to txColorScheme.
- [Enabled Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/enabled-property/llms-full.txt): Returns or sets whether a TXRulerBar responds to user-generated events: True (default) lets the ruler bar respond, False prevents it from responding.
- [EnablePageMargins Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/enablepagemargins-property/llms-full.txt): Enables or disables setting the page margins with a TXRulerBar: True, the default, lets users set the page margins on the ruler, False disables it.
- [FormulaMode Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/formulamode-property/llms-full.txt): Sets whether a TXRulerBar shows table cell references in A1 or R1C1 notation: rlNone (default), rlAuto for formula cells or rlAlways in any table cell.
- [hWnd Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/hwnd-property/llms-full.txt): Returns the window handle of a TXRulerBar for Windows API calls that expect an hWnd argument; the property is read only and available at run time only.
- [Language Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/language-property/llms-full.txt): Sets the language of the TXRulerBar resources: 41, 43 and 49 select German variants, other values English; ResourceFile adds further languages.
- [MouseDown Event](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/mousedown-event/llms-full.txt): Occurs when the user presses a mouse button over a TXRulerBar, passing the button, the SHIFT, CTRL and ALT state and the X and Y position in the ruler.
- [MouseMove Event](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/mousemove-event/llms-full.txt): Occurs when the user moves the mouse over a TXRulerBar, passing the state of the mouse buttons, the SHIFT, CTRL and ALT keys and the X and Y position.
- [MouseUp Event](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/mouseup-event/llms-full.txt): Occurs when the user releases a mouse button over a TXRulerBar, passing the button, the SHIFT, CTRL and ALT state and the X and Y position in the ruler.
- [ReadOnly Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/readonly-property/llms-full.txt): Sets a TXRulerBar to read only mode: when True, the ruler still shows the formatting of the connected TextControl, but users cannot change it there.
- [ResourceFile Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/resourcefile-property/llms-full.txt): Returns or sets the full path of a resource library the TXRulerBar loads to display its resources; when set, the Language property is ignored. Run time only.
- [RightToLeft Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/righttoleft-property/llms-full.txt): Returns or sets whether a TXRulerBar has its origin at the right or left border; set at run time, the window is recreated and must be reassigned to RulerHandle.
- [ScaleUnits Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/scaleunits-property/llms-full.txt): Returns or sets the scale units of a TXRulerBar as an Integer: 0 for millimeters, 1 for centimeters or 2 for inches shown on the ruler's measuring scale.

---

## Nearby

- **Previous:** [Style Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txbuttonbar/style-property/llms-full.txt)
- **Next:** [Appearance Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txrulerbar/appearance-property/llms-full.txt)
