Posted on 2002-07-18
I've just discovered a strange bug in TUpDown (D5 Enterprise) -
Place a TUpDown and a two TEdits onto a form, set the TUpDown's Wrap property to true, and Associate it with Edit1. Add an OnClick event to show which button was clicked (up or down) -
procedure TForm1.UpDown1Click(Sender: TObject; Button: TUDBtnType);
Edit2.Text := IntToStr(ord(Button));
At the wrap point (by default Min & Max should be 0 & 100 respectively) the Button value is reversed! When the value is 100, clicking the Prev button returns btNext, when the value is 0, clicking the Next button returns btPrev...
Anyone know of a fix?