diff --git a/OneMore/Commands/Navigator/NavigatorWindow.Designer.cs b/OneMore/Commands/Navigator/NavigatorWindow.Designer.cs index 1f5e483ad5..e371906d14 100644 --- a/OneMore/Commands/Navigator/NavigatorWindow.Designer.cs +++ b/OneMore/Commands/Navigator/NavigatorWindow.Designer.cs @@ -141,6 +141,7 @@ private void InitializeComponent() this.pageBox.Name = "pageBox"; this.pageBox.Size = new System.Drawing.Size(528, 250); this.pageBox.TabIndex = 0; + this.pageBox.Resize += new System.EventHandler(this.ResizePageBox); // // pageHeadPanel // diff --git a/OneMore/Commands/Navigator/NavigatorWindow.cs b/OneMore/Commands/Navigator/NavigatorWindow.cs index b98cc112fc..8e3bcfc2b2 100644 --- a/OneMore/Commands/Navigator/NavigatorWindow.cs +++ b/OneMore/Commands/Navigator/NavigatorWindow.cs @@ -539,6 +539,20 @@ private async void DoKeyDown(object sender, KeyEventArgs e) e.Handled = true; } } + + + private void ResizePageBox(object sender, EventArgs e) + { + var margin = SystemInformation.VerticalScrollBarWidth * 2; + + foreach (MoreLinkLabel link in pageBox.Controls) + { + var leftpad = ((Heading)link.Tag).Level * HeaderIndent; + var leftmar = leftpad + 4; + link.Width = pageBox.Width - leftmar - margin; + + } + } #endregion Page headings