Hi All,
I'm working on a program and what I'm trying to do is limit the user to inputting whole and decimal numbers seperately as eventually the program will convert them to a string that does not show the decimal place. However if you look at the attached screenshot, the DCL file is putting the decimal place in between the edit boxes as I want, however it's got way too much space between the edit_boxes and the decimal point. How do I fix that?
@Anonymous wrote:
Hi All,
I'm working on a program and what I'm trying to do is limit the user to inputting whole and decimal numbers seperately as eventually the program will convert them to a string that does not show the decimal place. However if you look at the attached screenshot, the DCL file is putting the decimal place in between the edit boxes as I want, however it's got way too much space between the edit_boxes and the decimal point. How do I fix that?
1) Instead of using rows, use columns. First column will have all the text. Second column will have the first text box. Third column will have the decimal. Fourth column will have the second edit box.
2) Having said that, I'll offer a little bit of commentary. It will be much easier for the user if there is ONE edit box and then you can get the whole number and decimal number portions programattically. You can make it so that pressing the OK button causes a function to run that will validate each edit box. If a problem is found, display an error message (like to place a text label near the ok button called "Error") and don't close the dialog box. If there is NO problem found, then close the dialog and perform the needed calculations.
Besides besides being easier for the user, it'll be easier for you to program.
Don Ireland
Engineering Design Technician
Also even if you do go with the two edit boxes as you're planning, you'll still need to validate the data to ensure the user did NOT enter a decimal number in those fields anyway.
Don Ireland
Engineering Design Technician
Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.
Can't find what you're looking for? Ask the community or share your knowledge.