Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Setting Grid's margin in javascript
Setting Grid's margin in javascript [message #997031] Thu, 03 January 2013 08:02 Go to next message
Jan Krakora is currently offline Jan Krakora
Messages: 477
Registered: December 2009
Location: Prague
Senior Member
Hi,

I'm trying to set a negative top margin to a Grid based on its height.

So I have created onRender script like this:
importPackage(Packages.java.lang);
System.out.println(this.height);


But this.height is null, why? How can I get the Grid's height?
Re: Setting Grid's margin in javascript [message #997124 is a reply to message #997031] Thu, 03 January 2013 15:25 Go to previous messageGo to next message
Michael Williams is currently offline Michael Williams
Messages: 1547
Registered: July 2009
Senior Member

What determines the height of the grid? A long text? A table? Is it something you could calculate a good approximation for? If I set a height, I can get the value, in the afterRender, but without setting it, I get 0.0.

Michael

Add interactivity, scheduling, sharing, live Excel export, and JS integration to your BIRT app with the new, free BIRT server, BIRT iHub F-Type.
Re: Setting Grid's margin in javascript [message #997131 is a reply to message #997124] Thu, 03 January 2013 15:54 Go to previous message
Jan Krakora is currently offline Jan Krakora
Messages: 477
Registered: December 2009
Location: Prague
Senior Member
The grid contains three rows and three columns, in each cell is a Label. The grid has set its width to 40% and its parent is a table.
I would like to move that grid up exactly by its height.
Previous Topic:Needing some help to show data
Next Topic:Opening a hyperlink
Goto Forum:
  


Current Time: Thu Jul 31 17:45:49 EDT 2014

Powered by FUDForum. Page generated in 0.01497 seconds