3

I am using nebula plugin for creating grid viewer in eclipse RCP UI. I am facing problem in its scroller bar. When I drag the scroll bar and want to drop at specific location then it just revert to its last position from where I dragged it. I searched for it but not found exact solution. what is the reason and solution could be to resolve it.

Update: For particular tab it just not show its vertical scroll bar and the horizantal scroll bar have lost its right limit it just go to the invisible left most.

I created my nabula grid table viewer as followoing:

final GridTableViewer myTableViewer = new GridTableViewer(descCompo,
                SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.FULL_SELECTION
                | SWT.FLAT);

Update: this is my code. I am using column header in table too, in some specific tab it is going in number of 20 up to. I want to have verical bar always. here descComp is the composite. The main problem is that Horizantal bar is not having left limit mark so it is draggable up to out of border context. Please have look in to attach image too.

final GridTableViewer xyzviewer= new GridTableViewer(descCompo,
                SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI |SWT.WRAP | SWT.FULL_SELECTION
                | SWT.FLAT);
        xyzviewer.getGrid().setCellSelectionEnabled(true);
        xyzviewer.getGrid().setRowHeaderVisible(true);
        xyzviewer.getGrid().setDragDetect(true);
        xyzviewer.setAutoPreferredHeight(true);
        GridData dataForResem = new GridData(GridData.FILL_HORIZONTAL);
        dataForResem.heightHint = 300;
...

enter image description here

RTA
  • 1,251
  • 2
  • 14
  • 33
  • we can not help without see create part control method – SSP Oct 14 '13 at 13:37
  • would any body respond or should i, post it in new thread? – RTA Oct 16 '13 at 12:34
  • if any other information is needed, please mention. – RTA Oct 16 '13 at 12:36
  • What does _"Not having left most corner"_ mean? – Baz Oct 17 '13 at 18:41
  • @Baz means the horizantal bar at left extreem is dragable up to out of contex extent as you can see by image it is going out side of border width. As general I desired at both side bar should have limit mark. – RTA Oct 18 '13 at 05:44
  • Please pick it to answer..if any review required then please mention. – RTA Oct 18 '13 at 07:38

1 Answers1

0

From the screenshot it looks more like the Nebula Grid isn't laying out correctly in the composite.

What layout data are you setting for the grid?

Assuming the Composite has a GridLayout, you could use the following to cause the grid to fill and grab horizontally and vertically

xyzviewer.getGrid().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

mecsco
  • 2,250
  • 1
  • 15
  • 28