www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.dwt - Table header not visible - Windows 7

reply "deed" <none none.none> writes:
This example code doesn't render any table headers on Windows 7:


     Table table2 = new Table(shell, SWT.NONE);
     table2.setBounds(10, 10, 270, 80);
     table2.setHeaderVisible(true);

     TableColumn fruit = new TableColumn(table2, SWT.LEFT);
     fruit.setText("Fruit");
     fruit.setWidth(100);
     TableColumn colour = new TableColumn(table2, SWT.LEFT);
     colour.setText("Colour");
     colour.setWidth(170);

     TableItem fruit1 = new TableItem(table2, SWT.NONE);
     fruit1.setText(0, "Apple");
     fruit1.setText(1, "Red");
     fruit1.setChecked(true);
     TableItem fruit2 = new TableItem(table2, SWT.NONE);
     fruit2.setText(["Kiwi", "Green"]);
     fruit2.setBackground(new Color(display, 255, 0, 0));
     TableItem fruit3 = new TableItem(table2, SWT.NONE);
     fruit3.setText(["Banana", "Yellow"]);
Feb 16 2013
next sibling parent Jacob Carlborg <doob me.com> writes:
On 2013-02-16 14:01, deed wrote:
 This example code doesn't render any table headers on Windows 7:


      Table table2 = new Table(shell, SWT.NONE);
      table2.setBounds(10, 10, 270, 80);
      table2.setHeaderVisible(true);

      TableColumn fruit = new TableColumn(table2, SWT.LEFT);
      fruit.setText("Fruit");
      fruit.setWidth(100);
      TableColumn colour = new TableColumn(table2, SWT.LEFT);
      colour.setText("Colour");
      colour.setWidth(170);

      TableItem fruit1 = new TableItem(table2, SWT.NONE);
      fruit1.setText(0, "Apple");
      fruit1.setText(1, "Red");
      fruit1.setChecked(true);
      TableItem fruit2 = new TableItem(table2, SWT.NONE);
      fruit2.setText(["Kiwi", "Green"]);
      fruit2.setBackground(new Color(display, 255, 0, 0));
      TableItem fruit3 = new TableItem(table2, SWT.NONE);
      fruit3.setText(["Banana", "Yellow"]);
Please report any issues to https://github.com/d-widget-toolkit/dwt or the proper submodule. -- /Jacob Carlborg
Feb 16 2013
prev sibling parent reply torhu <no spam.invalid> writes:
On 16.02.2013 14:01, deed wrote:
 This example code doesn't render any table headers on Windows 7:
You need to link with /Lsu:windows:4 or /Lsu:console:4. That's DMD's command line syntax.
Feb 16 2013
parent "deed" <none none.none> writes:
 You need to link with /Lsu:windows:4 or /Lsu:console:4.  That's 
 DMD's command line syntax.
Thanks! Adding -L/SUBSYSTEM:WINDOWS:4 on the command line made it work.
Feb 16 2013