仍然有调整我的图像大小的问题。
使用 c sharp.net 4.0 winforms 和 MS Visual Studio 2010。
这是我目前拥有的代码:
private void ShowArrow()
{
foreach (DataGridViewRow paretoRow in ParetoGrid.Rows)
{
if ((paretoRow.Cells["Pareto6"].Value != null) && (Convert.ToInt32(paretoRow.Cells["CurrentPareto"].Value) < (Convert.ToInt32(paretoRow.Cells["NewPareto"].Value))))
{
downArrow.Width = 2;
downArrow.Height = 2;
paretoRow.Cells["p1"].Value = downArrow;
}
else if ((paretoRow.Cells["Pareto6"].Value != null) && (Convert.ToInt32(paretoRow.Cells["CurrentPareto"].Value) > (Convert.ToInt32(paretoRow.Cells["NewPareto"].Value))))
{
//ParetoGrid.Rows[paretoRow.Index].DefaultCellStyle.BackColor = Color.LightGreen;
paretoRow.Cells["p1"].Value = upArrow;
}
}
}
但是当我尝试编辑图像大小时,它说图像是只读的?这是调整图像大小的好方法吗?或者,还有更好的方法?
非常感谢