提交当前本机整理版本
This commit is contained in:
@@ -279,4 +279,27 @@ namespace Lskj.Control
|
||||
for (int i = 0; i < calcLen; i++)
|
||||
{
|
||||
string valueValue = ValueMember.Substring(0, 1) != "_" ? table.Rows[i][ValueMember] + "" : "";
|
||||
string textValue = TextMember.Substring
|
||||
string textValue = TextMember.Substring(0, 1) != "_" ? table.Rows[i][TextMember] + "" : "";
|
||||
|
||||
int valueWidth = GraphicsText.GetTextWidth(valueValue);
|
||||
int textWidth = GraphicsText.GetTextWidth(textValue);
|
||||
|
||||
if (iValueWidth < valueWidth) iValueWidth = valueWidth;
|
||||
if (iTextWidth < textWidth) iTextWidth = textWidth;
|
||||
}
|
||||
// 由于计算有误差,所以计算列结果都加10px
|
||||
iValueWidth = iValueWidth < 50 ? 50 : iValueWidth + 10;
|
||||
iTextWidth = iTextWidth + 10;
|
||||
int popupWidth = +iValueWidth + iTextWidth + iRemarkWidth + iOtherWidth + 20;
|
||||
this.Width = popupWidth;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user