[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [e4-dev] multiple pages in swt using eclipse 4
|
sorry to be emailing you again Paul, i am just running into problems getting this to work.
I have all my buttons and images already in a GridLayout containing a GridData. Can I have both a grid layout and a stack layout? and if so how can I call both?
This is my code:
@Inject
public Hotel(Composite parent) {
this.parent = parent;
{
SWTResourceManager.registerResourceUser(parent);
}
parent.setSize(818, 289);
}
@PostConstruct
public void buildUI() {
logger.info("Start building UI");
final GridLayout layout = new GridLayout(2, false);
parent.setLayout(layout);
//parent.setLayoutData(new GridData(GridData.FILL_BOTH));
final StackLayout layout1 = new StackLayout();
parent.setLayout(layout1);
title = new Label(parent, SWT.CENTER);
final GridData titleLData = new GridData();
titleLData.
heightHint = 69;
titleLData.
grabExcessVerticalSpace = true;
titleLData.
verticalAlignment = GridData.BEGINNING;
titleLData.
grabExcessHorizontalSpace = true;
titleLData.
horizontalAlignment = GridData.FILL;
title.setLayoutData(titleLData);
title.setText(messages.Hotel_Label);
title.setData("org.eclipse.e4.ui.css.id",
"SeparatorLabel");
'
Regards,
Ann.
On Sun, Jun 12, 2011 at 8:56 PM, Paul Webster
<pwebster@xxxxxxxxxxxxxxxxxxx> wrote:
On Sun, Jun 12, 2011 at 3:44 PM, Ann Smith
<annsmith.smith38@xxxxxxxxx> wrote:
I found a few examples on the web but all of them are using a shell and a display. Within my code Im calling:
'
final
GridLayout layout = new GridLayout(2, false);
parent.setLayout(layout);'
If parent is your parent composite, you can set a StackLayout on that composite. Any child composites of parent will then be stacked, only one visible at a time.
PW
--
Paul Webster
Hi floor. Make me a sammich! - GIR
_______________________________________________
e4-dev mailing list
e4-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/e4-dev