Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » CollapsibleButtons- Dont see buttons
icon8.gif  CollapsibleButtons- Dont see buttons [message #902866] Mon, 20 August 2012 18:54 Go to next message
jone smith is currently offline jone smithFriend
Messages: 6
Registered: August 2012
Junior Member
Hi,
I have problem with Nebula CollapsibleButtons.
I dont see Collapsible Button items when i run application.

Here is images:
index.php/fa/11246/0/

Please help!
Re: CollapsibleButtons- Dont see buttons [message #902920 is a reply to message #902866] Tue, 21 August 2012 07:49 Go to previous messageGo to next message
jone smith is currently offline jone smithFriend
Messages: 6
Registered: August 2012
Junior Member
if there is anyone alive on this forum??????????????????????????? Rolling Eyes
Re: CollapsibleButtons- Dont see buttons [message #902921 is a reply to message #902920] Tue, 21 August 2012 08:03 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
I'm inclined to not help people who can't wait a bit before getting free
support - I'm sorry that most of us live in Europe and work maybe in
another
timezone!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Post your code so that we can run it locally, what OS are you on, what's
your SWT-Version, which version of the CollapsibleButton do you use, ... .

Tom

Am 21.08.12 09:49, schrieb jone smith:
> if there is anyone alive on this forum??????????????????????????? :roll:
Re: CollapsibleButtons- Dont see buttons [message #902926 is a reply to message #902921] Tue, 21 August 2012 08:47 Go to previous messageGo to next message
jone smith is currently offline jone smithFriend
Messages: 6
Registered: August 2012
Junior Member
Here is my code :


package ba.fit.imeprojekta.ui.gui.v1;

import org.eclipse.swt.widgets.Display;

public class frmAdministrator {

	protected Shell shell;

	/**
	 * Launch the application.
	 * @param args
	 */
	public static void main(String[] args) {
		try {
			frmAdministrator window = new frmAdministrator();
			window.open();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	/**
	 * Open the window.
	 */
	public void open() {
		Display display = Display.getDefault();
		createContents();
		shell.open();
		shell.layout();
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch()) {
				display.sleep();
			}
		}
	}

	/**
	 * Create contents of the window.
	 */
	protected void createContents() {
		shell = new Shell();
		shell.setVisible(true);
		shell.setFullScreen(true);
		shell.setSize(635, 406);
		shell.setText("SWT Application");
		shell.setLayout(null);
		
		CollapsibleButtons collapsibleButtons = new CollapsibleButtons(shell, SWT.NONE, IColorManager.SKIN_AUTO_DETECT);
		collapsibleButtons.setBounds(95, 30, 233, 150);
		
		CustomButton customButton = collapsibleButtons.addButton("New Button", "New CollapsibleButton", null, null);
		
		CustomButton customButton_1 = collapsibleButtons.addButton("New Button", "New CollapsibleButton", null, null);

	}
}


I am using :
* win 7 ultimate x86
* Eclipse Java EE IDE for Web Developers. Version: Indigo Service Release 2
*SWT and Nebula plugins is latest version.
Re: CollapsibleButtons- Dont see buttons [message #902930 is a reply to message #902926] Tue, 21 August 2012 09:08 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
I have not debugged really deep but if you use a layout instead of
setting bounds you use a layout things work as expected.

> protected void createContents() {
> shell = new Shell();
> shell.setVisible(true);
> // shell.setFullScreen(true);
> shell.setSize(635, 406);
> shell.setText("SWT Application");
> shell.setLayout(new GridLayout());
>
> Image itemImage24 = new Image(shell.getDisplay(), Program
> .findProgram("jpg").getImageData().scaledTo(24, 24)); //$NON-NLS-1$
>
> Image itemImage16 = new Image(shell.getDisplay(), Program
> .findProgram("jpg").getImageData().scaledTo(16, 16)); //$NON-NLS-1$
>
> CollapsibleButtons collapsibleButtons = new CollapsibleButtons(shell, SWT.NONE, IColorManager.SKIN_AUTO_DETECT);
> collapsibleButtons.setLayoutData(new GridData(GridData.GRAB_VERTICAL| GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_END));
>
> CustomButton customButton = collapsibleButtons.addButton("New Button 1", "New CollapsibleButton", itemImage24, itemImage16);
> CustomButton customButton_1 = collapsibleButtons.addButton("New Button 2", "New CollapsibleButton", itemImage24, itemImage16);
>
> }



Am 21.08.12 10:47, schrieb jone smith:
> Here is my code :
>
> package ba.fit.imeprojekta.ui.gui.v1;
>
> import org.eclipse.swt.widgets.Display;
>
> public class frmAdministrator {
>
> protected Shell shell;
>
> /**
> * Launch the application.
> * @param args
> */
> public static void main(String[] args) {
> try {
> frmAdministrator window = new frmAdministrator();
> window.open();
> } catch (Exception e) {
> e.printStackTrace();
> }
> }
>
> /**
> * Open the window.
> */
> public void open() {
> Display display = Display.getDefault();
> createContents();
> shell.open();
> shell.layout();
> while (!shell.isDisposed()) {
> if (!display.readAndDispatch()) {
> display.sleep();
> }
> }
> }
>
> /**
> * Create contents of the window.
> */
> protected void createContents() {
> shell = new Shell();
> shell.setVisible(true);
> shell.setFullScreen(true);
> shell.setSize(635, 406);
> shell.setText("SWT Application");
> shell.setLayout(null);
>
> CollapsibleButtons collapsibleButtons = new
> CollapsibleButtons(shell, SWT.NONE, IColorManager.SKIN_AUTO_DETECT);
> collapsibleButtons.setBounds(95, 30, 233, 150);
>
> CustomButton customButton = collapsibleButtons.addButton("New
> Button", "New CollapsibleButton", null, null);
>
> CustomButton customButton_1 = collapsibleButtons.addButton("New
> Button", "New CollapsibleButton", null, null);
>
> }
> }
>
> I am using : * win 7 ultimate x86
> * Eclipse Java EE IDE for Web Developers. Version: Indigo Service Release 2
> *SWT and Nebula plugins is latest version.
Previous Topic:iOS-like widget for SWT
Next Topic:Sorting Nebula Grid Widget
Goto Forum:
  


Current Time: Sat Apr 20 16:37:28 GMT 2024

Powered by FUDForum. Page generated in 0.03554 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top