BBC BASIC for Windows
Programming >> User Interface >> Dialogue boxes
http://bb4w.conforums.com/index.cgi?board=ui&action=display&num=1228303785
Dialogue boxes
Post by Charlie6 on Dec 3rd, 2008, 10:29am
I have just rediscovered BB4W after a lapse of about 10 years. I am sure I will have many questions because memory is poor.
But first, how do I enter a negative value in a numeric edit box?
Peter W
Re: Dialogue boxes
Post by Michael Hutton on Dec 4th, 2008, 10:51pm
If you specify the ES_NUMERIC you can only enter DIGITS into the edit box, so it will not accept signed negative numbers a user types in. You can put them there with SETDLGINT where the last parameter is a boolean signed/not signed.
The other way is to not specify ES_NUMERIC and use a noraml text box and poll what the user is entering yourself in a loop..only allowing him/her to enter the digits 0-9 and a - sign.
I hope this is valid advice!
Michael