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

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