# HG changeset patch # User Ivo Smits # Date 1396528935 -7200 # Node ID 3347e1758e559ae732ac685f521121a43a150179 # Parent 57b4c2f895d18f1f44e503bac314db4e63ed7970 FBGUI: Updated UpDownControl diff -r 57b4c2f895d1 -r 3347e1758e55 FBGUI/FBGUI.cs --- a/FBGUI/FBGUI.cs Wed Apr 02 16:24:55 2014 +0200 +++ b/FBGUI/FBGUI.cs Thu Apr 03 14:42:15 2014 +0200 @@ -1650,7 +1650,7 @@ base.Paint(g); g.DrawRectangle(Pens.DarkBlue, 0, 0, Bounds.Width - 1, Bounds.Height - 1); int lh = (int)Math.Ceiling(SystemFonts.DefaultFont.GetHeight()); - String text = SelectedText; + String text = Text; if (text == null) { g.FillRectangle(Brushes.DarkGray, 2, 2, Bounds.Width - 4 - 16, Bounds.Height - 4); } else { @@ -1665,7 +1665,7 @@ ControlPaint.DrawScrollButton(g, xoff, 1, 16, he, ScrollButton.Up, buttonUpState); ControlPaint.DrawScrollButton(g, xoff, Bounds.Height - he - 1, 16, he, ScrollButton.Down, buttonDownState); } - protected abstract String SelectedText { get; } + protected abstract String Text { get; } protected override void MouseDown(Point position, MouseButtons buttons) { CaptureKeyboard(true); if ((buttons & MouseButtons.Left) != 0) { @@ -1742,7 +1742,7 @@ } } } - protected override string SelectedText { + protected override string Text { get { if (selectedIndex == -1) return null; Object item = items[selectedIndex]; @@ -1785,7 +1785,7 @@ set { maximum = value; if (this.value > maximum) this.Value = maximum; } } public int Step { get; set; } - protected override string SelectedText { + protected override string Text { get { return value.ToString(); } } protected override void ButtonPressDown() {