Skip to main content


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 10:02 Go to next message
Nicola Zanaga is currently offline Nicola ZanagaFriend
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 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
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/
Re: Strange behavior with CLabel and his client area [message #845827 is a reply to message #845747] Sun, 15 April 2012 13:08 Go to previous message
Nicola Zanaga is currently offline Nicola ZanagaFriend
Messages: 56
Registered: July 2009
Member
bug 376822 created
Previous Topic:Manipulate Composite/View dynamically
Next Topic:Control positions are wrong ?
Goto Forum:
  


Current Time: Tue Apr 23 13:46:35 GMT 2024

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

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

Back to the top