[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform.swt] Re: TabItem and Table

public static void main (String [] args) {
    Display display = new Display ();
    Shell shell = new Shell (display);
    TabFolder tabFolder = new TabFolder (shell, SWT.BORDER);
    TabItem tabItem = new TabItem (tabFolder, SWT.NULL);
    tabItem.setText ("TabItem with a Table");
    Table table = new Table(tabFolder, SWT.FULL_SELECTION | SWT.MULTI |
SWT.BORDER);
    table.setHeaderVisible(true);
    table.setLinesVisible(true);
    TableColumn column = new TableColumn(table, SWT.NONE);
    column.setText("column 1");
    for (int i = 0; i < 10; i++) {
        TableItem item = new TableItem(table, SWT.NONE);
        item.setText("item " + i);
    }
    column.pack();
    tabItem.setControl(table);
    tabFolder.setSize (400, 200);
    shell.pack ();
    shell.open ();
    while (!shell.isDisposed ()) {
        if (!display.readAndDispatch ()) display.sleep ();
    }
    display.dispose ();
}

"laurent" <lolodeux00@xxxxxxxxxxx> wrote in message
news:800pcv8nqq0ieifh0eq0sileojbl6rlhvl@xxxxxxxxxx
> Hi
> This is a simple question for you I think.....
>
> I build a TabFolder and more TabItem.
> I can't add something on my TabItem.
>
> What is the method for add one Table on a TabItem ?
> I have the same problem for add a Combo in a TableItem.
> And no real solution...
>
> thanks ...
> laurent