Posted by webmaster Guido on March 24, 2005
In Reply to: Have 5 Parameters Select any
two to compute results posted
by Lionel Joyner P12219 on March 24, 2005:
: Working on a Delphi Application where
I have 5 parameters and 5 Edit boxes. It takes any two parameters to compute the
remaining Parameters.
: Example:
: Editbox1 = Angle
: Editbox2 = Radius
: Editbox3 = Tangent
: Editbox4 = Arc
: Editbox5 = Chord
: If I enter (Angle) in Editbox1
: and enter the (Chord) in Editbox5 then I can compute the (Radius), (Tangent), and (Arc).
: I think this requirs a series of IF and ELSE statements but I have not been able to get organized on how to do this. Anyone knowing how this could be setup I would appreciate the help.
If only two of the editboxes contain text, then it's not so difficult to find out how to calculate the others. I'll come back to this in a next message tomorrow. But... what do you want to happen if more then 2 edit boxes contain something? Should the program take the first two edits that contain something? Or should the program say: please, clear 3 boxes? Another possible solution: put 5 check boxes next to the edit boxes. Now, the user must click 2 check boxes. Next:  if less than 2 are checked, the program looks if there are only 2 edits that are filled, and calculates the rest;  in "non defined" states, show an error message (for example: more than 2 edits used and more or than 2 checkboxes checked). Any
other ideas, before we start with ideas for the coding?
Guido
Related Articles and Replies:
