I have CtabItem inside which, there is a Composite widget. Then, I have added a few components inside it. The code goes like this -
Composite composite = new Composite(tabFolder, SWT.H_SCROLL);
tabItem.setControl(composite);
Label lblName = new Label(composite, SWT.NONE);
lblName.setBounds(10, 28, 55, 15);
lblName.setText("Name");
textName = new StyledText(composite, SWT.BORDER);
String myText = tree.getSelection()[0].getText();
textName.setText(myText);
Point textNamesize = textName.computeSize(SWT.DEFAULT, SWT.DEFAULT);
textName.setBounds(76, 28, textNamesize.x, 21);
Label lblPath = new Label(composite, SWT.NONE);
lblPath.setBounds(10, 83, 55, 15);
lblPath.setText("Path");
textPath = new StyledText(composite, SWT.READ_ONLY);
textPath.setBackground(new Color(d, 240, 240, 240));
Button saveButton = new Button(composite, SWT.NONE);
saveButton.setBounds(456, 134, 75, 25);
saveButton.setText("Save");
Button cancelButton = new Button(composite, SWT.NONE);
cancelButton.setBounds(548, 134, 75, 25);
cancelButton.setText("Cancel");
But, when I am displaying the tab, the scrolls are present, but, when I am scrolling the composite, the scroll bar moves , but the elements on the other side of the scroll are not showing Any, idea why it is not working ?
Thanks!