I have some suspicions about text rendering and initialization, but I  
haven't used the grid much yet. Please create a bug to keep track of  
this issue.

One clue: it is usually helpful to specify a <text> object's width.  
In this case width="${parent.width}" would help. <text>'s default  
width is small.

And: look at dataControlsVisibility. For debugging, it is useful to  
give databound text objects an initial value of "..." or "xxx" so you  
can see what it looks like even if there's databinding problems.

Hope this helps.
-ben

On Mar 20, 2006, at 12: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
> [email protected]
> http://www.openlaszlo.org/mailman/listinfo/laszlo-user

benjamin shine
software engineer
[EMAIL PROTECTED]



_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user

Reply via email to