Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Adjust windows


By the way, I notice that you are doing your own component layout.
In other words, in this line:
        l3.setBounds(9, 18, 40, 16);
you are using hard-coded numbers to position the label.

This is not the typical way to lay out components.
Are you sure you really want to do this?
Have you read the article on layouts?
In case it helps, here's the article:
http://www.eclipse.org/articles/Article-Understanding-Layouts/Understanding-Layouts.htm

Carolyn




Carolyn MacLeod/Ottawa/IBM@IBMCA
Sent by: platform-swt-dev-bounces@xxxxxxxxxxx

12/14/2005 01:07 PM

Please respond to
"Eclipse Platform SWT component developers list."

To
"Eclipse Platform SWT component developers list." <platform-swt-dev@xxxxxxxxxxx>
cc
Subject
Re: [platform-swt-dev] Adjust windows






FYI, you can get the screen resolution using display.getBounds();



guillen_carolina@xxxxxxxxxxx
Sent by: platform-swt-dev-bounces@xxxxxxxxxxx

12/14/2005 12:02 PM

Please respond to
"Eclipse Platform SWT component developers list."

To
"Eclipse Platform SWT component developers list." <platform-swt-dev@xxxxxxxxxxx>
cc
Subject
Re: [platform-swt-dev] Adjust windows







hello group
My error is shell.setSize(950, 700);
should be 800,600 to support the minimal resolution

bye
Mensaje citado por guillen_carolina@xxxxxxxxxxx:

> hello the group
>
> I use to main menu:
>
> shell = new Shell();
>                                   shell.setForeground(ResourceManager.getColor(255, 255, 128));
>                                   shell.setFont(ResourceManager.getFont("Arial", 10, SWT.BOLD));
>                                   shell.setMaximized(true);
>                                   shell.setSize(950, 700);
>                                   shell.setText("SISTEMA:: ART ATLAS");
>
>                                   Monitor primary = Display.getDefault().getPrimaryMonitor();
>                                   Rectangle bounds = primary.getBounds();
>                      Rectangle rect = shell.getBounds();
>                                   int shellX = (bounds.width - rect.width) / 2;
>                                   int shellY = (bounds.height - rect.height) / 2;
>                                   shell.setLocation(shellX, shellY);
>
> enter my shell, I composite windows, my windows inherit this:
>
> public class ComConsultaMaterial extends Composite {
> public ComConsultaMaterial(Composite parent, int style,String IDCateegory) {
>         super(parent, style);
>     }
>
>     private void CreateContens()
>     {
>                      final Label l3 = new Label(this, SWT.NONE);
>                      l3.setBounds(9, 18, 40, 16);
>                      l3.setText("Codigo :");
>   ***************but if i change the resolution this composite are aout of my
> screen
>
> How control the size of my composite, specific to the resolution'
>
> Thanks
>
>
> ----------------------------------------------------------------
> This mail sent through StarMail: http://www.star.com.pe
> _______________________________________________
> platform-swt-dev mailing list
> platform-swt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
>




----------------------------------------------------------------
This mail sent through StarMail: http://www.star.com.pe
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev


Back to the top