trichview.com

trichview.support




Re: Extend table by one row


Return to index


Author

Message

Stef Mientki

Posted: 09/17/2004 19:12:14


Although code below doesn't work perfect (sometimes an error message

occures), it does the job ;-)

Stef Mientki


In OnkeyDown:

   if (key=vk_return) and (shift=[]) then

   begin

     RVE_top :=RVE.TopLevelEditor;

     if(RVE.GetItemStyle(RVE.CurItemNo)=rvsTable) and

       (RVE_top.GetItemStyle(RVE_top.CurItemNo)<>rvsTable) then

     begin

       table:=TRVTableItemInfo(RVE.GetItem(RVE.CurItemNo));

       table.GetEditedCell(row,col);

//      memo1.lines.add(inttostr(col)+'/'+inttostr(row));

       if col>=table.Rows[0].Count-1 then

       begin

         if row>=table.Rows.Count-1 then

         begin

           if RVE.CanChange and

              RVE.GetCurrentItemEx(TRVTableItemInfo,RVEx, item) then

           begin

             table := TRVTableItemInfo(item);

             ItemNo :=RVEx.GetItemNo(table);

             RVEx.BeginItemModify(ItemNo, Data);

               table.InsertRowsBelow(1);

             RVEx.EndItemModify(ItemNo, Data);

             RVEx.Change;

//            table.EditCell(row+1,0);

           end;

         end

         else table.EditCell(row+1,0);

       end

       else table.EditCell(row,col+1);

       key:=0;

     end;



Sergey Tkachenko wrote:

> Sorry, it's not possible in the current version.

> In to-do list/





Powered by ABC Amber Outlook Express Converter