Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [ve-dev] Setting colors, SWT lables

Evi:
The SWt group will help you with that kind of stuffs mostly.
But when using VE, this is the place.
VE should be able to help you there!



-- 
Cheers
Philippe
http://easyeclipse.org - http://phpeclipse.net - http://eclipse.org/atf





> -----Original Message-----
> From: evi [mailto:evi@xxxxxxxxxx] 
> Sent: Thursday, September 13, 2007 9:35 AM
> To: pombredanne@xxxxxxxxx; 'Discussions people developing 
> code for the Visual Editor project'
> Subject: RE: [ve-dev] Setting colors, SWT lables
> 
> 
> Thanks:-))
> 
> Can you suggest where is the best place to find this kind of 
> information,
> specific to VE and SWT? SWT tutorials give different examples 
> and that's
> confusing. 
> 
> Regards,
> Evi
> 
> -----Original Message-----
> From: ve-dev-bounces@xxxxxxxxxxx 
> [mailto:ve-dev-bounces@xxxxxxxxxxx] On
> Behalf Of Philippe Ombredanne
> Sent: Thursday, September 13, 2007 6:18 PM
> To: 'Discussions people developing code for the Visual Editor project'
> Subject: RE: [ve-dev] Setting colors, SWT lables
> 
> Evi:
> What about using  something like:
> label.setBackground(new Color(Display.getDefault(),200,111,50));
> Or keeping a tab on a dislpay in a variable?
> 
> 
> 
> --
> Cheers
> Philippe
> 
> 
> 
> 
> -----Original Message-----
> From: ve-dev-bounces@xxxxxxxxxxx 
> [mailto:ve-dev-bounces@xxxxxxxxxxx] On
> Behalf Of evi
> Sent: Tuesday, September 11, 2007 4:23 AM
> To: ve-dev@xxxxxxxxxxx
> Subject: [ve-dev] Setting colors, SWT lables
> 
> 
> Hello!
> I have tried to figure out how to set label background colors 
> when working
> with Eclipse SWT. The only advise I found was to use
> "label.setBackground(new Color(display,200,111,50)); But in 
> automatically
> created VE+SWT construct "display" is not recognised. My code 
> is copied
> below, please advise what I need to change in order to set 
> background colors
> to widgets. 
> import org.eclipse.swt.layout.GridLayout;
> import org.eclipse.swt.graphics.Point;
> import org.eclipse.swt.widgets.Shell;
> import org.eclipse.swt.widgets.Display;
> import org.eclipse.swt.widgets.Label;
> import org.eclipse.swt.SWT;
> import org.eclipse.swt.graphics.*;
> public class StartWindow {
>  private Shell sShell = null;
>  private Label label = null;
> 
>  public static void main(String[] args) {
> 
>   Display display = Display.getDefault();
>   StartWindow thisClass = new StartWindow();
>   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");
>   sShell.setSize(new Point(300, 200));
>   sShell.setLayout(new GridLayout());
>   label = new Label(sShell, SWT.NONE);
>   label.setText("labellabellabel");
>   label.setBackground(new Color(display,200,111,50));  } } 
> Regards, Evi
> 
> _______________________________________________
> ve-dev mailing list
> ve-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/ve-dev
> 



Back to the top