Home » Eclipse Projects » Remote Application Platform (RAP) » Strange behavior with CLabel and his client area
Strange behavior with CLabel and his client area [message #845688] |
Sun, 15 April 2012 10:02 |
Nicola Zanaga Messages: 56 Registered: July 2009 |
Member |
|
|
I try to create a "Text" object over an "CLabel", in a mode that the Text cover the entire label.
With SWT work fine, but with RAP 1.5M5 the "Text" has wrong position, with RAP 1.5M6 give an error.
The code:
Display display = new Display ();
Shell shell = new Shell(display);
shell.setSize(600,300);
CLabel label = new CLabel(shell, SWT.NONE);
label.setBounds(50,50,300,50);
label.setBackground( display.getSystemColor(SWT.COLOR_BLUE) );
Text t = new Text(label, SWT.NONE);
Rectangle r = label.getClientArea();
t.setBounds( r );
t.setBackground( display.getSystemColor(SWT.COLOR_RED) );
shell.open ();
while (!shell.isDisposed ()) {
if (!display.readAndDispatch ()) display.sleep ();
}
display.dispose ();
With RAP 1.5M6 the error is:
Error: Error: Operation "create" on target "w4" of type "null" failed:
c.getChildren() is null
Properties:
parent = w3
style = LEFT,SINGLE
bounds = 6,6,288,38
tabIndex = 2
background = 255,0,0,255
....
|
|
|
Re: Strange behavior with CLabel and his client area [message #845747 is a reply to message #845688] |
Sun, 15 April 2012 11:29 |
Ivan Furnadjiev Messages: 2426 Registered: July 2009 Location: Sofia, Bulgaria |
Senior Member |
|
|
Hi Nicola,
in 1.5M6 we completely reworked the client-side Label/CLabel
implementation. Please file a bugzilla and attach the code there.
Thanks,
Ivan
On 4/15/2012 1:02 PM, Nicola Zanaga wrote:
> I try to create a "Text" object over an "CLabel", in a mode that the
> Text cover the entire label.
> With SWT work fine, but with RAP 1.5M5 the "Text" has wrong position,
> with RAP 1.5M6 give an error.
>
> The code:
>
> Display display = new Display ();
> Shell shell = new Shell(display);
> shell.setSize(600,300);
>
> CLabel label = new CLabel(shell, SWT.NONE);
> label.setBounds(50,50,300,50);
> label.setBackground( display.getSystemColor(SWT.COLOR_BLUE) );
>
> Text t = new Text(label, SWT.NONE);
> Rectangle r = label.getClientArea();
> t.setBounds( r );
> t.setBackground( display.getSystemColor(SWT.COLOR_RED) );
>
> shell.open ();
> while (!shell.isDisposed ()) {
> if (!display.readAndDispatch ()) display.sleep ();
> }
> display.dispose ();
>
> With RAP 1.5M6 the error is:
>
> Error: Error: Operation "create" on target "w4" of type "null" failed:
> c.getChildren() is null
> Properties: parent = w3
> style = LEFT,SINGLE
> bounds = 6,6,288,38
> tabIndex = 2
> background = 255,0,0,255
> ...
>
--
Ivan Furnadjiev
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
| |
Goto Forum:
Current Time: Tue Apr 23 13:46:35 GMT 2024
Powered by FUDForum. Page generated in 0.03181 seconds
|