我在form1中有listview,在打印预览中我使用下面的代码来获取列,但是当我在打印预览中查看时,listview上的文本就在右边。
他们在右边请帮我在打印预览显示时如何在右边制作它们。
int[] X = { 40, 100, 160, 540, 650 }; //relative to Left margin510
int Y = 450; //relative to Top margin
Font F = listView3.Font;
Brush B = new SolidBrush(listView3.ForeColor);//
for (int I = 0; I < listView3.Items.Count; I++)
{
for (int J = 0; J < listView3.Items[I].SubItems.Count; J++)
{
e.Graphics.DrawString(listView3.Items[I].SubItems[J].Text, F, B, X[J], Y );//
}
Y += F.Height;
}