When Content of a StepItem changes, refresh the ItemAnnotations

FindText changed to use StepRTB object
This commit is contained in:
Rich 2010-01-11 22:20:33 +00:00
parent 214cc7769e
commit d00dc0749e
2 changed files with 5 additions and 1 deletions

View File

@ -154,6 +154,7 @@ namespace Volian.Controls.Library
void MyContent_Changed(object sender)
{
// Update the text to reflect the content change
MyStepRTB.MyItemInfo.RefreshItemAnnotations();
MyStepRTB.MyItemInfo=MyStepRTB.MyItemInfo; // Reset Text
SetExpandAndExpander(MyItemInfo);
// TODO: Need code to update tabs ? not sure what this is - maybe for
@ -1283,6 +1284,9 @@ namespace Volian.Controls.Library
&& ((ItemInfo)newItemInfo.ActiveParent).Notes.Count > 0)
nextItem = MyStepPanel.FindItem(((ItemInfo)newItemInfo.ActiveParent).Notes[0]);
// TODO: May need similar logic if a Table is being added to a step that has substeps
// else if (fromType == E_FromType.Table && ((ItemInfo)newItemInfo.ActiveParent).Steps != null
//&& ((ItemInfo)newItemInfo.ActiveParent).Steps.Count > 0)
// nextItem = MyStepPanel.FindItem(((ItemInfo)newItemInfo.ActiveParent).Steps[0]);
StepItem newStepItem;
switch (fromType)
{

View File

@ -1806,7 +1806,7 @@ namespace Volian.Controls.Library
private RichTextBoxFinds _FindOptions = RichTextBoxFinds.None;
public void FindText(string str, bool caseSensitive, bool matchWholeWord, bool reverse)
{
StepRTB savRTF = new RTF();
StepRTB savRTF = new StepRTB();
int startpos = SelectionStart + SelectionLength;
savRTF.Text = this.Text;