Actually 2 questions.
1) I have a Richview of cells. If the cursor is in a cell and I use the down key to begin scrolling down , when it reaches the bottom of the cell instead of continuing to the next cell and moves focus all the way to the bottom cell and loses the cursor. Is there to smoothly move the cursor up and down thru the cells?
2) I must be missing something. How does one insert text by code. Say I want to insert a string on the second line in a cell or richview. How do I say what line and position ?
John K
Scrolling in cells with up down arrows
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
1) Correct. You have any example code or a demo that might demonstrate how to do this?
2) Doesnt matter. I just want to insert text at the beginning of each cell.
Currently I stream in cell. I see I can call cell[].AddNL and then my stream. But that puts the stream text below my NL. I want to call a cell[].InsertText but the cells don't have an insert.
2) Doesnt matter. I just want to insert text at the beginning of each cell.
Currently I stream in cell. I see I can call cell[].AddNL and then my stream. But that puts the stream text below my NL. I want to call a cell[].InsertText but the cells don't have an insert.
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
1) I still do not understand. This is a default (and the only possible behavior) - moving to the beginning of the lower cell when pressing the Down key
2) As an editing operation:
First, initiate inplace editor for the cell:
Now, the caret is at the beginning of this cell, and this cell is edited. Editor for the cell is available as RichViewEdit1.TopLevelEditor.
For example, you can move caret to the end of this cell:
For inserting, you can use RichViewEdit1.TopLevelEditor.InsertText, or simply RichViewEdit1.InsertText (in all cases, text is inserted in the position of caret, in the top level editor)
2) As an editing operation:
First, initiate inplace editor for the cell:
Code: Select all
table.EditCell(r, c);
For example, you can move caret to the end of this cell:
Code: Select all
with RichViewEdit1.TopLevelEditor do
SetSelectionBounds(ItemCount-1, GetOffsAfterItem(ItemCount-1),
ItemCount-1, GetOffsAfterItem(ItemCount-1));
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: