--- Tiziano-tele2 <[EMAIL PROTECTED]> escribió:

> 
> (this test was made with the same results with Lazarus 0.9.16 on
> windows, and on Linux Ubuntu)
>
---------------------------------------------------------------------------------------------
> open a new project, place a stringgrid and a button components on
> the form.
> 
> double-click the button and edit the Button1Click event:
> 
> procedure TForm1.Button1Click(Sender: TObject);
> begin
>    stringgrid1.rows[1].commatext:='1,2,3,4,5';
>    stringgrid1.rows[2].text:=
> 'a'+#13#10+'s'+#13#10+'d'+#13#10+'f'+#13#10+'g';
> end;
> 
> now run the project and press the button, the grid should display
> the new values, but nothing
> happens.
> 
> If I read the values of the commatext or text properties it works
> as expected:
> 
> edit the stringgrid and put 1 2 3 4 5 on the first row and a s d f
> g on the second row
> 
> place a second button and a memo on the form
> 
> double click the second button and edit the Button2Click event:
> 
> procedure TForm1.Button2Click(Sender: TObject);
> begin
>    memo1.lines.add(stringgrid1.rows[1].commatext);
>    memo1.lines.add(stringgrid1.rows[2].text);
> end;
> 
> now run the project and press the button2, the memo1 correctly
> displays:
> 
> ----------
> 1,2,3,4,5
> a
> s
> d
> f
> g
> ----------
> 
> bye
> tiziano
> 

Hi Tiziano

It works this way by design, to see some info about it see: 

http://wiki.lazarus.freepascal.org/index.php/Grids_Reference_Page#property_Rows.5Bindex:_Integer.5D:_TStrings_read_GetRows_write_SetRows.3B

Regards.

Jesus Reyes A.


        
        
                
___________________________________________________________ 
Do You Yahoo!? 
La mejor conexión a Internet y <b >2GB</b> extra a tu correo por $100 al mes. 
http://net.yahoo.com.mx 

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to