FireGlow
1 Feb 2010, 5:21 AM
Hey folks,
I have a problem with a toolbar that is at the end of the following hirarchy.
It adds my buttons as a kind menu point, instead of just adding the buttons in a normal way.
GXT 2.1.x
GWT 1.7.0
(Problem didn't exist with GXT 2.0.1)
ViewPort
|--LayoutContainer 1
|--LayoutContainer 2
|--TabPanel 1
|--TabItem 1
|--LayoutContainer 3
|--ContentPanel 1
|--FormPanel 1
|--ContentPanel 2
|--ToolBar
|--Button
|--Button
|--Button
The same toolbar works in other Panels, but not as a TopComponent of ContentPanel 2.
The Code how I add the toolbar is the following snipt:
toolbar = new ToolBar();
EHRflexToolItem addButton = new EHRflexToolItem("Add", "icon-action-grid-add", true);
addButton.addSelectionListener(new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
Dispatcher.get().forwardEvent(new EHRflexEvent(EHRflexEventType.MEDICAL_DATA_GRID_ADD, shownGrid));
}
});
addButton.setTitle("Add");
EHRflexToolItem editButton = new EHRflexToolItem("Edit", "icon-action-grid-edit", true);
editButton.setTitle("Edit");
editButton.addSelectionListener(new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
Dispatcher.get().forwardEvent(new EHRflexEvent(EHRflexEventType.MEDICAL_DATA_GRID_EDIT, shownGrid));
}
});
EHRflexToolItem deleteButton = new EHRflexToolItem("Delete", "icon-action-grid-delete", true);
deleteButton.setTitle("Delete");
deleteButton.addSelectionListener(new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
Dispatcher.get().forwardEvent(new EHRflexEvent(EHRflexEventType.MEDICAL_DATA_GRID_DELETE, shownGrid));
}
});
toolbar.add(addButton);
toolbar.add(new SeparatorToolItem());
toolbar.add(editButton);
toolbar.add(new SeparatorToolItem());
toolbar.add(deleteButton);
toolbar.setAlignment(HorizontalAlignment.LEFT);
toolbar.layout();
Any ideas why the toolbar works on other places fine and here not ? Anyone met the problem already that the toolbar creates a menu point instead of showing the buttons in a line?
Thanks for any help
Anton
I have a problem with a toolbar that is at the end of the following hirarchy.
It adds my buttons as a kind menu point, instead of just adding the buttons in a normal way.
GXT 2.1.x
GWT 1.7.0
(Problem didn't exist with GXT 2.0.1)
ViewPort
|--LayoutContainer 1
|--LayoutContainer 2
|--TabPanel 1
|--TabItem 1
|--LayoutContainer 3
|--ContentPanel 1
|--FormPanel 1
|--ContentPanel 2
|--ToolBar
|--Button
|--Button
|--Button
The same toolbar works in other Panels, but not as a TopComponent of ContentPanel 2.
The Code how I add the toolbar is the following snipt:
toolbar = new ToolBar();
EHRflexToolItem addButton = new EHRflexToolItem("Add", "icon-action-grid-add", true);
addButton.addSelectionListener(new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
Dispatcher.get().forwardEvent(new EHRflexEvent(EHRflexEventType.MEDICAL_DATA_GRID_ADD, shownGrid));
}
});
addButton.setTitle("Add");
EHRflexToolItem editButton = new EHRflexToolItem("Edit", "icon-action-grid-edit", true);
editButton.setTitle("Edit");
editButton.addSelectionListener(new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
Dispatcher.get().forwardEvent(new EHRflexEvent(EHRflexEventType.MEDICAL_DATA_GRID_EDIT, shownGrid));
}
});
EHRflexToolItem deleteButton = new EHRflexToolItem("Delete", "icon-action-grid-delete", true);
deleteButton.setTitle("Delete");
deleteButton.addSelectionListener(new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
Dispatcher.get().forwardEvent(new EHRflexEvent(EHRflexEventType.MEDICAL_DATA_GRID_DELETE, shownGrid));
}
});
toolbar.add(addButton);
toolbar.add(new SeparatorToolItem());
toolbar.add(editButton);
toolbar.add(new SeparatorToolItem());
toolbar.add(deleteButton);
toolbar.setAlignment(HorizontalAlignment.LEFT);
toolbar.layout();
Any ideas why the toolbar works on other places fine and here not ? Anyone met the problem already that the toolbar creates a menu point instead of showing the buttons in a line?
Thanks for any help
Anton