This commit is contained in:
2011-03-31 18:36:56 +00:00
parent 98ba49a249
commit cae4e76643
4 changed files with 35 additions and 13 deletions

View File

@@ -1035,14 +1035,19 @@ namespace Volian.Controls.Library
if (!_InitializingRTB)
{
Size offset = Size - ClientSize;
int widthNew = ContentsSize.Width + offset.Width + AdjustSize.Width ;
int widthNew = (this is TableCellEditor) ? Width : (ContentsSize.Width + offset.Width + AdjustSize.Width);
//int widthNew = Width;
//if (!(this is TableCellEditor))
// widthNew = ContentsSize.Width + offset.Width + AdjustSize.Width;
int heightNew = ContentsSize.Height + offset.Height + AdjustSize.Height;
// Don't make the window narrower unless it has text - RHM - 20100107
Size szNew = new Size(((Text != "" && adjustWidth) ? widthNew : (widthNew > Width ? widthNew : Width)), heightNew);
if (this.Size != szNew)
{
int heightOld = Height;
//Console.WriteLine("before {0}, {1}, {2}, {3}, {4}", Size, szNew, widthNew, Width, this.GetType().Name);
this.Size = szNew;
//Console.WriteLine("after {0}, {1}, {2}, {3}", Size, szNew, widthNew, Width);
if (heightOld != Height)
OnHeightChanged(this, new EventArgs());
}