Beyond_Beyaan.BBStretchButton.SetText C# (CSharp) Метод

SetText() публичный Метод

public SetText ( string text ) : void
text string
Результат void
        public void SetText(string text)
        {
            _label.SetText(text);
            Text = text;
            switch (_alignment)
            {
                case ButtonTextAlignment.LEFT:
                    _label.MoveTo(_xPos + 5, (int)((_height / 2.0f) - (_label.GetHeight() / 2) + _yPos));
                    break;
                case ButtonTextAlignment.CENTER:
                    _label.MoveTo((int)((_width / 2.0f) - (_label.GetWidth() / 2) + _xPos), (int)((_height / 2.0f) - (_label.GetHeight() / 2) + _yPos));
                    break;
                case ButtonTextAlignment.RIGHT:
                    _label.MoveTo((int)(_xPos + _width - 5 - _label.GetWidth()), (int)((_height / 2.0f) - (_label.GetHeight() / 2) + _yPos));
                    break;
            }
        }