This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
Reference in New Issue
Block a user