Board index » delphi » edit box

edit box


2005-12-30 08:57:37 AM
delphi42
Hi there;
1- if I use text value of an edit box instead of a Const value, how can I
stop user donot use blank edit box? how can I stop user not to type data out
of a range (range of 8 to 270) and if he use more than 270 or less than 8 it
always pick 8? is it possibe? should I use what ever would be offered for
"OnChange" even of the edit box?
Thanks for help
 
 

Re:edit box

Darius writes:
Quote
1- if I use text value of an edit box instead of a Const value, how can I
stop user donot use blank edit box? how can I stop user not to type data out
of a range (range of 8 to 270) and if he use more than 270 or less than 8 it
always pick 8? is it possibe? should I use what ever would be offered for
"OnChange" even of the edit box?
Have you considered using a TTrackBar or a TUpDown associated with a
read-only TEdit? Besides being a more "natural" solution (the limits are
inherent to the components), you wouldn't have to check every key
pressed and keep the user from pasting a value into the component.
Both components are on the Win32 page of the palette.
HTH,
Ronaldo