Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 403629

Summary: [Table] Scrollbar may be rendered incorrectly
Product: [RT] RAP Reporter: Tim Buschtoens <tbuschto>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Tim Buschtoens CLA 2013-03-18 09:32:28 EDT
It is possible that the scrollbar thumb is rendered a it's rightmost positon while the table can actually scroll further. To reproduce, add this method to TableTab.java (Controls Demo) and call it in createStyleContents:

  private void createHideColumnControl() {
    Composite composite = new Composite( styleComp, SWT.NONE );
    RowLayout layout = new RowLayout(  SWT.HORIZONTAL );
    layout.center = true;
    composite.setLayout( layout );
    Label label = new Label( composite, SWT.NONE );
    label.setText( "Column" );
    final Text text = new Text( composite, SWT.BORDER );
    Util.textSizeAdjustment( label, text );
    text.setText( String.valueOf( columns - 1 ) );
    Button button = new Button( composite, SWT.PUSH );
    button.setText( "Hide" );
    button.addSelectionListener( new SelectionAdapter() {
      @Override
      public void widgetSelected( SelectionEvent event ) {
        try {
          int index = Integer.parseInt( text.getText() );
          TableColumn column = table.getColumn( index );
          column.setWidth( 0 );
        } catch( Exception e ) {
          // ignore invalid column
        }
      }
    } );
  }

Now run the controls demo and make column 1 or two very large. Then click first "hide", then "show".

I have not tried this yet with Tree or Nebula Grid. I don't think it's a recent regression.
Comment 1 Ivan Furnadjiev CLA 2013-03-22 09:18:49 EDT
Tim, I can't reproduce it. For me everything is working as expected.
Comment 2 Ivan Furnadjiev CLA 2013-09-30 04:54:19 EDT
It's working fine for me. When you click on "hide" button the column 4 width is set to 0. When you click on "show" button the column 4 width stays 0 and horizontal scrollbar scrolls to the end (column 3 is completely visible). Please reopen if I miss something.