Toolbar and SWT.FLAT [message #463219] |
Mon, 31 October 2005 18:17 |
Eclipse User |
|
|
|
Originally posted by: davidyoung_2001.yahoo.co.uk
If I create a toolbar with SWT.FLAT and then add a ToolItem with
SWT.DROPDOWN type, the right hand arrow part of the DROPDOWN button is not
displayed as SWT.FLAT....is this a bug in SWT or is there something I am
missing?
|
|
|
|
Re: Toolbar and SWT.FLAT [message #463304 is a reply to message #463294] |
Thu, 03 November 2005 08:38 |
Eclipse User |
|
|
|
Originally posted by: friederich.kupzog.de
Hi,
well, it works fine for me on win32. No idea how to help. You could send
me a snippet and I try it out. If you are also on win32 there is a
chance that we can find out what you do wrong.
Regards,
Friederich
david young wrote:
> Any takers on this?
>
--
Friederich Kupzog
Elektronik & Software
Neusser Str. 5-7
50670 Köln
Tel 0241 160696-1
Fax 0221 726670
www.kupzog.de/fkmk
|
|
|
Re: Toolbar and SWT.FLAT [message #463321 is a reply to message #463304] |
Thu, 03 November 2005 13:44 |
Eclipse User |
|
|
|
Originally posted by: davidyoung_2001.yahoo.co.uk
OK know I'm very confused on Windows XP Professional - it works, on
Windows XP Home Edition, it doesn't
package myMail;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.ToolBar;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.ToolItem;
public class Test {
private Shell sShell = null;
private ToolBar toolBar = null;
/**
* This method initializes toolBar
*
*/
private void createToolBar() {
toolBar = new ToolBar(sShell, SWT.FLAT);
toolBar.setBounds(new org.eclipse.swt.graphics.Rectangle(1,3,291,37));
ToolItem toolItem = new ToolItem(toolBar, SWT.DROP_DOWN);
toolItem.setText("Test");
}
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
/* Before this is run, be sure to set up the launch configuration
(Arguments->VM Arguments)
* for the correct SWT library path in order to run with the SWT dlls.
* The dlls are located in the SWT plugin jar.
* For example, on Windows the Eclipse SWT 3.1 plugin jar is:
* installation_directory\plugins\org.eclipse.swt.win32_3.1.0.j ar
*/
Display display = Display.getDefault();
Test thisClass = new Test();
thisClass.createSShell();
thisClass.sShell.open();
while (!thisClass.sShell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}
/**
* This method initializes sShell
*/
private void createSShell() {
sShell = new Shell();
sShell.setText("Shell");
createToolBar();
sShell.setSize(new Point(300, 200));
}
}
|
|
|
Re: Toolbar and SWT.FLAT [message #463323 is a reply to message #463321] |
Thu, 03 November 2005 15:20 |
Eclipse User |
|
|
|
Originally posted by: friederich.kupzog.de
Hi David,
just tested it on WinXP Home Edition: ToolItem including drop-down arrow
are perfectly flat.
No idea what your problem is. Sorry.
Regards,
Friederich
david young wrote:
> OK know I'm very confused on Windows XP Professional - it works, on
> Windows XP Home Edition, it doesn't
>
> package myMail;
>
> import org.eclipse.swt.graphics.Point;
> import org.eclipse.swt.widgets.Shell;
> import org.eclipse.swt.widgets.Display;
> import org.eclipse.swt.widgets.ToolBar;
> import org.eclipse.swt.SWT;
> import org.eclipse.swt.widgets.ToolItem;
>
> public class Test {
>
> private Shell sShell = null;
> private ToolBar toolBar = null;
>
> /**
> * This method initializes toolBar
> *
> */
> private void createToolBar() {
> toolBar = new ToolBar(sShell, SWT.FLAT);
> toolBar.setBounds(new
> org.eclipse.swt.graphics.Rectangle(1,3,291,37));
> ToolItem toolItem = new ToolItem(toolBar, SWT.DROP_DOWN);
> toolItem.setText("Test");
> }
>
> /**
> * @param args
> */
> public static void main(String[] args) {
> // TODO Auto-generated method stub
> /* Before this is run, be sure to set up the launch
> configuration (Arguments->VM Arguments)
> * for the correct SWT library path in order to run with the SWT
> dlls. * The dlls are located in the SWT plugin jar. *
> For example, on Windows the Eclipse SWT 3.1 plugin jar is:
> *
> installation_directory\plugins\org.eclipse.swt.win32_3.1.0.j ar
> */
> Display display = Display.getDefault();
> Test thisClass = new Test();
> thisClass.createSShell();
> thisClass.sShell.open();
>
> while (!thisClass.sShell.isDisposed()) {
> if (!display.readAndDispatch())
> display.sleep();
> }
> display.dispose();
> }
>
> /**
> * This method initializes sShell
> */
> private void createSShell() {
> sShell = new Shell();
> sShell.setText("Shell");
> createToolBar();
> sShell.setSize(new Point(300, 200));
> }
>
> }
>
>
--
Friederich Kupzog
Elektronik & Software
Neusser Str. 5-7
50670 Köln
Tel 0241 160696-1
Fax 0221 726670
www.kupzog.de/fkmk
|
|
|
|
Powered by
FUDForum. Page generated in 0.04066 seconds