FairyGUI.GTextField.HandleSizeChanged C# (CSharp) Method

HandleSizeChanged() protected method

protected HandleSizeChanged ( ) : void
return void
        protected override void HandleSizeChanged()
        {
            if (_updatingSize)
                return;

            if (underConstruct)
                displayObject.SetSize(this.width, this.height);
            else if (_textField.autoSize != AutoSizeType.Both)
            {
                if (_textField.autoSize == AutoSizeType.Height)
                {
                    displayObject.width = this.width;//先调整宽度,让文本重排
                    if (this._text != string.Empty) //文本为空时,1是本来就不需要调整, 2是为了防止改掉文本为空时的默认高度,造成关联错误
                        SetSizeDirectly(this.width, displayObject.height);
                }
                else
                    displayObject.SetSize(this.width, this.height);
            }
        }