Skip to content

Commit

Permalink
Fix resize events
Browse files Browse the repository at this point in the history
  • Loading branch information
niksedk committed Jan 16, 2021
1 parent 491dbdc commit 0c3dde0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/XmlContentTranslator/Main.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 15 additions & 1 deletion src/XmlContentTranslator/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,21 @@ private void listViewLanguageTags_DoubleClick(object sender, EventArgs e)

private void Main_Resize(object sender, EventArgs e)
{
listViewLanguageTags.Columns[listViewLanguageTags.Columns.Count - 1].Width = -2;
Main_ResizeEnd(null, null);
}

private void Main_ResizeEnd(object sender, EventArgs e)
{
if (listViewLanguageTags.Columns.Count > 0)
{
var w = 0;
for (int i = 0; i < listViewLanguageTags.Columns.Count - 1; i++)
{
w += listViewLanguageTags.Columns[i].Width;
}

listViewLanguageTags.Columns[listViewLanguageTags.Columns.Count - 1].Width = listViewLanguageTags.Width - 25 - w;
}
}
}
}
2 changes: 1 addition & 1 deletion src/XmlContentTranslator/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Nikse.dk")]
[assembly: AssemblyProduct("Xml Content Translator")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down

0 comments on commit 0c3dde0

Please sign in to comment.