Use Argument to set SelectedStepTabPanel

Set IsVisible rather than Visible for DisplayTags
Only lookup ROs if MyRTB.SelectedText contains text
Dock lbFound above the RO TreeView
This commit is contained in:
Rich 2010-12-21 20:31:54 +00:00
parent 6618b1f51e
commit a3b9bc73ab
3 changed files with 19 additions and 11 deletions

View File

@ -1004,9 +1004,8 @@ namespace VEPROMS
// When infotabTags is set to Visible, the matching panel also needs to be set to visible // When infotabTags is set to Visible, the matching panel also needs to be set to visible
// the other panels will appear as they are selected by the user. // the other panels will appear as they are selected by the user.
infotabControlPanelTags.Visible = true; infotabControlPanelTags.Visible = true;
displayTags.Visible = true; displayTags.IsVisible = true;
} }
// When infotabTags is set to Visible, it is given focus. The next line returns focus to the StepRTB // When infotabTags is set to Visible, it is given focus. The next line returns focus to the StepRTB
args.MyStepItem.MyStepRTB.Focus(); args.MyStepItem.MyStepRTB.Focus();
displayTransition.MyRTB = args.MyStepItem.MyStepRTB; displayTransition.MyRTB = args.MyStepItem.MyStepRTB;
@ -1020,8 +1019,11 @@ namespace VEPROMS
dlgFindReplace.MyStepItem = args.MyStepItem; dlgFindReplace.MyStepItem = args.MyStepItem;
SpellChecker.MyStepItem = args.MyStepItem; SpellChecker.MyStepItem = args.MyStepItem;
} }
if (tc.SelectedDisplayTabItem != null) if (args.MyStepItem != null)
SelectedStepTabPanel = ((DisplayTabItem)tc.SelectedDisplayTabItem).MyStepTabPanel; {
SelectedStepTabPanel = args.MyStepItem.MyStepPanel.MyStepTabPanel;
//SelectedStepTabPanel = ((DisplayTabItem)tc.SelectedDisplayTabItem).MyStepTabPanel;
}
} }
ctrlAnnotationDetails.UpdateAnnotationGrid(_CurrentItem); ctrlAnnotationDetails.UpdateAnnotationGrid(_CurrentItem);
AnnotationPanelView(); AnnotationPanelView();

View File

@ -244,6 +244,7 @@ namespace Volian.Controls.Library
// //
// lbFound // lbFound
// //
this.lbFound.Dock = System.Windows.Forms.DockStyle.Top;
this.lbFound.FormattingEnabled = true; this.lbFound.FormattingEnabled = true;
this.lbFound.ItemHeight = 16; this.lbFound.ItemHeight = 16;
this.lbFound.Location = new System.Drawing.Point(0, 218); this.lbFound.Location = new System.Drawing.Point(0, 218);

View File

@ -92,14 +92,19 @@ namespace Volian.Controls.Library
lbFound.SelectionMode = SelectionMode.None; lbFound.SelectionMode = SelectionMode.None;
lbFound.DataSource = null; lbFound.DataSource = null;
//Spin through ROs looking for the selected text //Spin through ROs looking for the selected text
string lookFor = _MyRTB.SelectedText; if (_MyRTB.SelectedText != "")
List<ROFSTLookup.roChild> children = _MyROFST.ROFSTLookup.GetRosByValue(lookFor);
if (children != null)
{ {
lbFound.Visible = true; string lookFor = _MyRTB.SelectedText;
lbFound.DataSource = children.ToArray(); List<ROFSTLookup.roChild> children = _MyROFST.ROFSTLookup.GetRosByValue(lookFor);
lbFound.SelectionMode = SelectionMode.One; if (children != null)
lbFound.SelectedIndex = -1; {
lbFound.Visible = true;
lbFound.DataSource = children.ToArray();
lbFound.SelectionMode = SelectionMode.One;
lbFound.SelectedIndex = -1;
}
else
lbFound.Visible = false;
} }
else else
lbFound.Visible = false; lbFound.Visible = false;