I am new to SWT, and I need to set the controls positions arbitrary on CTabItem.
I've used the following code, but it seems that it had no positioning effect, it just add the component to (0, 0)
Label userName = new Label(folder, SWT.NONE);
userName.setText("username");
userName.setBounds(10, 200, 200, 50);
item.setControl(userName);
You will need to set a LayoutManager to
folder
, e.g.:If you wish to give the control a certain dimensions, consider giving it LayoutData, e.g.:
I'm not sure what
item
is in your example, but it doesn't seem to be necessary.