Home > Back-end > Ask you a question about the interface
Ask you a question about the interface
Time:10-06
On the interface placed an Edit and a UpDown. Don't set the Associate association; According to the UpDown when realizing the increasing or decreasing; The code is as follows:
Void __fastcall TForm1: : UpDown1Click (TObject * Sender, TUDBtnType Button) { If (StrToInt (Edit3 - & gt; The Text) & lt; UpDown1 - & gt; Min) { UpDown1 - & gt; The Position=UpDown1 - & gt; Min. } If (btNext==Button) This - & gt; Edit3 - & gt; Text=UpDown1 - & gt; The Position + UpDown1 - & gt; Increment; The else This - & gt; Edit3 - & gt; Text=UpDown1 - & gt; The Position - UpDown1 - & gt; Increment; }
For example, I set the UpDown value range is 10-100 when I was smaller than 10 inputs, found that the increasing number of jumps over 10 to 11 and I want to directly when the input is less than 10 from 10 increase, if the range is far more direct incremental;
CodePudding user response:
Added an Increment in the first if the back add a else, put in the behind of the if - else statements as a whole