I'm sure I might be going about this the wrong way, but here is what I'm trying to accomplish.
My UI has two sides, on the left a user entry form, and on the right a RTB that is formatted to look like a report might. On load, I define bookmarks to note the start and end of areas. These start and end bookmarks are to help me identify where to place any updates I'll need to do through code.
When the user types in a value or performs an action on the user entry form, some corresponding changes will need to happen within the RTB document. I'll need to find the location within the document and perform the update.
Ideally, I can simply identify where I need to select text within the document, delete it, and replace it with whatever. Also worth noting is that most updates will occur within a Textbox TextChanged event, so speed is a factor as well.
Am I approaching this the right way? This is my first go with the RTB, and I want to make sure I'm doing things somewhat correct. lol
Sample range identification:
Update 10/21/2013: I'm attempting to dig into annotations now, but I'm unable to find any good information regarding their usage, either in the documentation or here in the forum. I believe as this point, annotations are what I'm looking for. I'd still like some input on how I can best accomplish my goals.
Thanks!
Wayne
My UI has two sides, on the left a user entry form, and on the right a RTB that is formatted to look like a report might. On load, I define bookmarks to note the start and end of areas. These start and end bookmarks are to help me identify where to place any updates I'll need to do through code.
When the user types in a value or performs an action on the user entry form, some corresponding changes will need to happen within the RTB document. I'll need to find the location within the document and perform the update.
Ideally, I can simply identify where I need to select text within the document, delete it, and replace it with whatever. Also worth noting is that most updates will occur within a Textbox TextChanged event, so speed is a factor as well.
Am I approaching this the right way? This is my first go with the RTB, and I want to make sure I'm doing things somewhat correct. lol
Sample range identification:
this
.txtCareplanPreview.InsertLineBreak();
this
.txtCareplanPreview.InsertBookmark(
"InterventionNotes"
+ intItem.CCGInterventionId.ToString());
this
.txtCareplanPreview.Insert(
"Notes: "
+ intItem.Description);
this
.txtCareplanPreview.InsertBookmark(
"InterventionNotesEnd"
+ intItem.CCGInterventionId.ToString());
this
.txtCareplanPreview.InsertLineBreak();
Update 10/21/2013: I'm attempting to dig into annotations now, but I'm unable to find any good information regarding their usage, either in the documentation or here in the forum. I believe as this point, annotations are what I'm looking for. I'd still like some input on how I can best accomplish my goals.
Thanks!
Wayne