From ff7f67c9ec977d55f5ddb0d744c3ba15e183f4a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dennis=20M=C3=B8llegaard?= Date: Sat, 21 Aug 2021 00:33:01 +0200 Subject: [PATCH] Make column size match the area available in ConsoleListView --- Components/WinFormUI/Forms/MainWindow.Designer.cs | 5 +++-- Components/WinFormUI/Forms/MainWindow.cs | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Components/WinFormUI/Forms/MainWindow.Designer.cs b/Components/WinFormUI/Forms/MainWindow.Designer.cs index 3f3da4ff..ec80cf4a 100644 --- a/Components/WinFormUI/Forms/MainWindow.Designer.cs +++ b/Components/WinFormUI/Forms/MainWindow.Designer.cs @@ -97,6 +97,7 @@ private void InitializeComponent() this.EventsTabControl.SelectedIndex = 0; this.EventsTabControl.Size = new System.Drawing.Size(707, 495); this.EventsTabControl.TabIndex = 5; + this.EventsTabControl.Resize += new System.EventHandler(this.EventsTabControl_Resize); // // tabPage1 // @@ -149,7 +150,7 @@ private void InitializeComponent() // // columnHeader2 // - this.columnHeader2.Width = 600; + this.columnHeader2.Width = 2000; // // tabPage3 // @@ -302,7 +303,7 @@ private void InitializeComponent() // TestEventsMenuItem // this.TestEventsMenuItem.Name = "TestEventsMenuItem"; - this.TestEventsMenuItem.Size = new System.Drawing.Size(180, 22); + this.TestEventsMenuItem.Size = new System.Drawing.Size(131, 22); this.TestEventsMenuItem.Text = "&Test Events"; this.TestEventsMenuItem.ToolTipText = "Allows users to send test events to test scripts"; this.TestEventsMenuItem.Click += new System.EventHandler(this.TestEventsMenuItem_Click); diff --git a/Components/WinFormUI/Forms/MainWindow.cs b/Components/WinFormUI/Forms/MainWindow.cs index ba2161a9..a5a8e2fb 100644 --- a/Components/WinFormUI/Forms/MainWindow.cs +++ b/Components/WinFormUI/Forms/MainWindow.cs @@ -107,6 +107,7 @@ bool deepView EventsCollected.Selected(LuaScriptTreeNode); EventsTabControl.SelectedIndex = 1; + ConsoleListView.Columns[0].Width = EventsTabControl.Width - 20; Text += " v" + applicationVersionService.Version; @@ -565,5 +566,10 @@ private void CopyLuaHandlerCodeMenuItem_Click(object sender, EventArgs e) "; CopyToClipBoard(code); } + + private void EventsTabControl_Resize(object sender, EventArgs e) + { + ConsoleListView.Columns[0].Width = EventsTabControl.Width - 20; + } } } \ No newline at end of file