Page 1 of 1
					
				Table -> Cell[c,r] -> selectAll
				Posted: Sun Jun 11, 2006 3:58 pm
				by Denoson
				I need to select all value of table cell.
Code: Select all
  if not EDITOR.CanChange or
     not EDITOR.GetCurrentItemEx(TRVTableItemInfo, rve, item) then exit;
  table := TRVTableItemInfo(item);
  if table.GetEditedCell(r,c)<>nil then 
  begin
    table.Cells[r,c].SelectAll;
    Caption := 'Cell: ' + inttostr(r) + ', ' + inttostr(c);
  end;
Edit-cell is detected (Row and Column), but text is not selected.
 
			
					
				
				Posted: Mon Jun 12, 2006 4:26 pm
				by Sergey Tkachenko
				Code: Select all
  if not EDITOR.GetCurrentItemEx(TRVTableItemInfo, rve, item) then exit; 
  table := TRVTableItemInfo(item); 
  if table.GetEditedCell(r,c)<>nil then 
  begin 
    table.Cells[r,c].GetRVData.SelectAll; 
    table.Cells[r,c].GetRVData.Invalidate;
    Caption := 'Cell: ' + inttostr(r) + ', ' + inttostr(c); 
  end; 
When the cell is edited, all cell items are moved to the cell inplace editor.
Its content is available as Cell.GetRVData.
Also, I removed CanChange, because this code does not modify document.
 
			
					
				Cells
				Posted: Mon Jun 12, 2006 6:15 pm
				by Denoson
				I try new code, but:
 table.Cells[r,c].GetRVData. - has no 
SelectAll and 
Invalidate methods 

 
			
					
				Cells
				Posted: Wed Jun 14, 2006 8:17 pm
				by Denoson
				Hello Sergey, any news about Cells->Select all?
			 
			
					
				
				Posted: Thu Jun 15, 2006 1:39 pm
				by Sergey Tkachenko
				Code: Select all
  if not EDITOR.GetCurrentItemEx(TRVTableItemInfo, rve, item) then exit; 
  table := TRVTableItemInfo(item); 
  if table.GetEditedCell(r,c)<>nil then 
  begin 
    TCustomRVFormattedData(table.Cells[r,c].GetRVData).SelectAll; 
    TCustomRVFormattedData(table.Cells[r,c].GetRVData).Invalidate; 
    Caption := 'Cell: ' + inttostr(r) + ', ' + inttostr(c); 
  end; 
 
			
					
				Cells -> Select all
				Posted: Fri Jun 16, 2006 9:21 am
				by Denoson
				Thanks this code works well.