- 눈에 안 띄는 글자들 처리(listview group, trend chart legend)
- listview column width 꽉차도록 처리
This commit is contained in:
41
Theme.cs
41
Theme.cs
@@ -62,6 +62,47 @@ namespace friction
|
||||
e.DrawDefault = true;
|
||||
}
|
||||
|
||||
public static void ResizeFullColumn(ListView view)
|
||||
{
|
||||
bool bScrollbarPresented = false;
|
||||
foreach (var scroll in view.Controls.OfType<VScrollBar>())
|
||||
{
|
||||
bScrollbarPresented = true;
|
||||
break;
|
||||
}
|
||||
|
||||
int iWidth = view.Width;
|
||||
if (bScrollbarPresented == true)
|
||||
iWidth -= SystemInformation.VerticalScrollBarWidth;
|
||||
switch (view.BorderStyle)
|
||||
{
|
||||
case BorderStyle.Fixed3D:
|
||||
iWidth -= 4;
|
||||
break;
|
||||
case BorderStyle.FixedSingle:
|
||||
iWidth -= 2;
|
||||
break;
|
||||
}
|
||||
|
||||
for (int i = 0; i < view.Columns.Count; i++)
|
||||
{
|
||||
if (view.Columns[i].Width < iWidth)
|
||||
{
|
||||
iWidth -= view.Columns[i].Width;
|
||||
}
|
||||
else
|
||||
{
|
||||
view.Columns[i].Width = iWidth;
|
||||
// Hide columns that can't fit
|
||||
for (int jx = i + 1; jx < view.Columns.Count; ++jx)
|
||||
view.Columns[jx].Width = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
view.Columns[view.Columns.Count - 1].Width += iWidth;
|
||||
}
|
||||
|
||||
public class MenustripColor : ProfessionalColorTable
|
||||
{
|
||||
public override Color MenuItemSelected { get { return BackColorTrans; } }
|
||||
|
||||
Reference in New Issue
Block a user