Ordinary Button using ActionContributionItem [message #465330] |
Wed, 28 March 2007 16:25 |
Jan Kohnert Messages: 196 Registered: July 2009 |
Senior Member |
|
|
Hello List,
I'm trying to create a simple ordinary good old Button using a
ActionContributionItem and a Composite. When saying 'simple ordinary good
old Button' I mean not a Button inside a Coolbar or somewhere else where
it could hang out beeing somehow fancy.
I mean a gray button on a gray background somewhere on a View.
The Code:
buttonF1Action = new
ActionContributionItem(actionProvider.getFunction_F1()); buttonF1Action.setMode(ActionContributionItem.MODE_FORCE_TEX T);
buttonF1Action.fill(buttonF1);
Where buttonF1Action is a ActionContributionItem,
buttonfF1 is a Compoiste that is created juts like this:
buttonF1 = toolkit.createComposite(functionButtonComposite, SWT.NONE);
buttonF1.setLayout(new FillLayout());
buttonF1.setBackground(Display.getCurrent().getSystemColor(S WT.COLOR_WIDGET_BACKGROUND));
final GridData gd_buttonF1 = new GridData(SWT.FILL, SWT.FILL, true, false);
gd_buttonF1.heightHint = 35;
buttonF1.setLayoutData(gd_buttonF1);
So what ist the problem?
My problem is that the Button widget never displays both, the text AND the
image of the underlying action. I've searched a while and found some old
posts from 2003 handling the problem. I'm using Eclipse Version: 3.2.2
Build id: M20070212-1330 on Windows XP. Is it possible that this issue is
still not solved?
Or are I'm doing something fundamentally wrong? The only thing I want is a
Actions Image and Text side by side (image left, text right) on a 'simple
ordinary good old Button' :(
thanks & with best regards,
Jan
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04191 seconds