Adjust scroll location when DisplayTabControl is resized
This commit is contained in:
parent
b1b68a3091
commit
89cf82efa7
@ -31,6 +31,8 @@ namespace Volian.Controls.Library
|
||||
/// A bar is the docking location for the DisplayTabItems.
|
||||
/// </summary>
|
||||
private int _UniqueBarCount;
|
||||
private ItemInfo _MyItemInfo = null;
|
||||
private StepItem _MyStepItem = null;
|
||||
#endregion
|
||||
#region Events
|
||||
/// <summary>
|
||||
@ -130,6 +132,8 @@ namespace Volian.Controls.Library
|
||||
/// <param name="args"></param>
|
||||
internal void OnItemSelectedChanged(object sender, ItemSelectedChangedEventArgs args)
|
||||
{
|
||||
_MyItemInfo = args.MyItemInfo;
|
||||
_MyStepItem = args.MyStepItem;
|
||||
if (ItemSelectedChanged != null) ItemSelectedChanged(sender, args);
|
||||
}
|
||||
#endregion
|
||||
@ -147,6 +151,13 @@ namespace Volian.Controls.Library
|
||||
_MyDisplayTabItems = new Dictionary<string, DisplayTabItem>();
|
||||
SetupBar(_MyBar);
|
||||
dotNetBarManager1.BarTearOff += new EventHandler(dotNetBarManager1_BarTearOff);
|
||||
this.Resize += new EventHandler(DisplayTabControl_Resize);
|
||||
}
|
||||
void DisplayTabControl_Resize(object sender, EventArgs e)
|
||||
{
|
||||
// If the currently selected Item is in a Step, then adjust the scroll as necessary to keep it visible
|
||||
if (_MyStepItem != null)
|
||||
_MyStepItem.ItemShow();
|
||||
}
|
||||
private void SetupBar(Bar myBar)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user