[Laszlo-user] Grid control bug in 3.2cr3?

Amy Muntz amuntz at openlaszlo.org
Wed Mar 22 16:35:41 EST 2006


Hi James,
The short answer is that the problem is in the use of stretch in the  
code, and not in the grid control.
Ben was able to investigate this further (thanks, Ben!).  I've  
provided his input from the JIRA bug here in case it might be helpful  
to other people too:

"In the code provided by the user, the instance of myGrid (which  
extends grid) has stretches="both". That doesn't make sense here;  
stretches is for stretching resources, not for stretching components.  
The grid's width and height are constrained to the width and height  
of the parent view correctly in the user's test case, with width="$ 
{parent.width}"
height="${parent.height - 28}"

Removing the line stretches="both" makes the column headers appear  
properly. "

In addition - he also checked in an updated test file, test/bugs/ 
lpp-1852.lzx, which displays both the "broken" behavior and the  
correct behavior.

--- Amy

On Mar 20, 2006, at 3:23 PM, James Howe wrote:

> I'm using a grid control in my application.  I've been running  
> under 3.1.1
> and things work fine.  I recently downloaded the 3.2cr3 version and  
> tried
> my application using that platform.  I noticed that the Grid  
> control did
> some strange things when running under 3.2.  I'm not sure whether  
> this is
> a bug in 3.2 or whether it's a problem with the way that I'm using the
> control which didn't show up in 3.1.1.  Here is a simple example of my
> program:
>
> <canvas debug="true">
>     <dataset name="testdata">
>         <items>
>             <item>
>                  <column1>Hey1 </column1>
>                  <column2>Column 2 (1)</column2>
>                  <column3>1234</column3>
>                  <sort>1</sort>
>             </item>
>             <item>
>                  <column1>Hey 2</column1>
>                  <column2>Column 2 (2)</column2>
>                  <column3>2234</column3>
>                  <sort>2</sort>
>             </item>
>             <item>
>                  <column1>Hey 3</column1>
>                  <column2>Column 2 (3)</column2>
>                  <column3>3234</column3>
>                  <sort>3</sort>
>             </item>
>         </items>
>     </dataset>
>     <class name="myGrid" spacing="2" extends="grid" showvlines="true"
> bgcolor1="#EEEEEE" bgcolor0="white">
> 	<gridcolumn name="column1" text="From" width="180" resizemargin="1"
> resizable="false">
> 	   <text font="Arial" datapath="column1/text()"/>
> 	</gridcolumn>
> 	<gridcolumn name="column2" text="Subject" width="${parent.width -  
> 365}"
> resizemargin="1" resizable="false">
> 	   <text font="Arial" fontstyle="bold" datapath="column2/text()"/>
>          </gridcolumn>
> 	<gridcolumn name="column3" text="Date/Time" width="185"  
> resizemargin="1"
> resizable="false" sortpath="sort/text()">
> 	   <text font="Arial" fontstyle="bold"
> datapath="column3/text()"></text>			
> 	</gridcolumn>				
>      </class>
>
>      <view width="500" height="300">
> 	<myGrid
> 		width="${parent.width}"
> 		height="${parent.height - 28}"
> 		stretches="both"
> 		datapath="testdata:/items"
> 		contentdatapath="item"
> 		multiselect="true"/>
>      </view>			
> </canvas>
>
> When I run under 3.1.1, the column headings at the top display as gray
> buttony things the width of each column.  The titles of the column  
> appear
> immediately.  When I run under 3.2cr3, I get three blank gray buttony
> things the width of each column, no column label appears.  If I  
> click the
> top of the column, the column sorts just fine.  If I move my mouse  
> from
> one column to the next, suddenly the column heading displays, but the
> heading is reduced in length so that the clickable header is only  
> slightly
> bigger than the text of the label.
>
> If I'm doing something wrong, or if something has changed with the  
> grid
> control I'm happy to correct my code, if not, should I go ahead and  
> file a
> bug report?
>
> Thanks!
>
>
> -- 
> James Howe
> _______________________________________________
> Laszlo-user mailing list
> Laszlo-user at openlaszlo.org
> http://www.openlaszlo.org/mailman/listinfo/laszlo-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-user/attachments/20060322/40c67b4c/attachment-0001.html


More information about the Laszlo-user mailing list