Beispiel #1
0
		public Spinner()
		{
			_textBox = new TextBox();
			_upButton = new Button(new Image(ResourceHelper.GetStream("up.png")));
			_downButton = new Button(new Image(ResourceHelper.GetStream("down.png")));
			_textBox.Body = Value.ToString();
			_upButton.Clicked += delegate {
				StepUp();
			};
			_downButton.Clicked += delegate {
				StepDown();
			};
			
			_textBox.BodyChanged += OnTextBoxBodyChanged;
			_goodColor = _textBox.TextColor;
		}
		protected virtual void Decorate(TextBox textBox)
		{
			FillRectangle(Coord.Zeros, textBox.RenderSize, Corner.None, FillType.Editable, textBox.HitState, AnchorLocation.S);
			StrokeRectangle(Coord.Zeros, textBox.RenderSize, Corner.None, textBox.HitState);
		}