TX Text Control is shipped with ready-to-use ruler bars to adjust page or paragraph settings such as page margins, tab positions or indents. These bars are encapsulated in separate controls. This allows a very flexible usage like linking the ruler bars to a Text Control which is positioned in a different Window.

To save workspace, you could arrange ruler bars in separate Windows. The connected ruler bars are adjusted automatically to reflect the current settings of the docked TextControl object.

The following screenshot shows how this setup would look like:

TX Text Control with external ruler bars

When changes are made with the RulerBar, TextControl is getting hold of the focus. This would imply that the ruler is not usable when used in an external Window. This can be easily solved using a little trick: On the MouseEnter event of the RulerBar, TextControl can be temporary disabled and enabled again when the mouse leaves the RulerBar.

private TextControl _parent;

private void rulerBar1_MouseEnter(object sender, EventArgs e)
{
    _parent.Enabled = false;
}

private void rulerBar1_MouseLeave(object sender, EventArgs e)
{
    _parent.Enabled = true;
}

This configuration gives some applications more flexibility. Consider a setup with more TextControl instances on a form. The same ruler bars can be used for all instances of TextControl:

TX Text Control with external ruler bars