Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
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 06:02 Go to next message
Nicola  Zanaga is currently offline Nicola Zanaga
Messages: 21
Registered: July 2009
Junior 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 07:29 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan Furnadjiev
Messages: 1794
Registered: July 2009
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/
Re: Strange behavior with CLabel and his client area [message #845827 is a reply to message #845747] Sun, 15 April 2012 09:08 Go to previous message
Nicola  Zanaga is currently offline Nicola Zanaga
Messages: 21
Registered: July 2009
Junior Member
bug 376822 created
Previous Topic:Example RAP & Spring Integration
Next Topic:oeju.UrlEncoded:maxFormKeys limit exceeded keys>1000
Goto Forum:
  


Current Time: Fri Aug 22 23:41:12 EDT 2014

Powered by FUDForum. Page generated in 0.12879 seconds