Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Toolbar and SWT.FLAT
Toolbar and SWT.FLAT [message #463219] Mon, 31 October 2005 13:17 Go to next message
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 #463294 is a reply to message #463219] Wed, 02 November 2005 13:57 Go to previous messageGo to next message
Eclipse User
Originally posted by: davidyoung_2001.yahoo.co.uk

Any takers on this?
Re: Toolbar and SWT.FLAT [message #463304 is a reply to message #463294] Thu, 03 November 2005 03:38 Go to previous messageGo to next message
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 08:44 Go to previous messageGo to next message
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 10:20 Go to previous messageGo to next message
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
Re: Toolbar and SWT.FLAT [message #463353 is a reply to message #463323] Fri, 04 November 2005 02:27 Go to previous message
Eclipse User
Originally posted by: davidyoung_2001.yahoo.co.uk

I've re-installed everything on the Windows XP machine and it works now

thanks for the help
Previous Topic:performOK() return cancel, disables ok button?
Next Topic:how to get current cursor location relative to current editor
Goto Forum:
  


Current Time: Sat Jul 26 01:10:34 EDT 2014

Powered by FUDForum. Page generated in 0.02122 seconds