Example usage for org.eclipse.swt.custom StyledText setTabs

List of usage examples for org.eclipse.swt.custom StyledText setTabs

Introduction

In this page you can find the example usage for org.eclipse.swt.custom StyledText setTabs.

Prototype

public void setTabs(int tabs) 

Source Link

Document

Sets the tab width.

Usage

From source file:StyledTextTabSize.java

public static void main(String[] args) {
    final Display display = new Display();
    final Shell shell = new Shell(display);

    StyledText styledText = new StyledText(shell, SWT.V_SCROLL | SWT.BORDER);
    styledText.setText("12345");

    styledText.setTabs(2);

    styledText.setBounds(10, 10, 100, 100);
    shell.open();/*from  w w  w . j  a  v  a 2s  .c om*/
    while (!shell.isDisposed()) {
        if (!display.readAndDispatch()) {
            display.sleep();
        }
    }
    display.dispose();

}