Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

clear display

Status
Not open for further replies.

springbok71

Programmer
Mar 27, 2005
2
GB
Absolute beginner here, got an assingment. The question is to clear the display as soon as any of the inputs are changed from a sed the display being the answer.
Does it have something to do with OnChange, OnEnter or OnKey if so how is it used.
Any help would be most appreciated.
 
We're not allowed to supply code for assignments, but I don't think pointing you in the right direction is against the rules. Couple of questions for you to answer that might make it a bit clearer (the info you gave is a bit vague).

1) "clear the display" - Are you writing a console app, or are you referring to a textbox or the whole form with that?

2) "any of the inputs are changed from a sed" - I'm guessing a typo? Can't quite figure out what you're saying there.

Quick guide to the event handlers:

OnChange - This is called whenever the contents are changed

OnKey - This is called whenever the user presses a key, ie pushes it down and then lets it go. That definition may seem a bit obvious, but it can be quite important and you have the onKeyDown and onKeyUp handlers as well.

OnEnter - This is called if the enter key is pressed while the control has focus, think of it as a special version of onKey
 
I am refering to spin edits, which calculate boxes of fruit using div between the two spin edits, and the answer is displayed by by pressing a button, the answer is displayed using labels.
That part I have done, then it askes to write the code to clear the deails of the answer as soon as any of the inputs from the spin edit is changed.
Hope this is clearer.
 
Ok. Changing the value of the label is easy enough via the caption property, and you've chosen an event handler for yourself:
"the spin edit is changed"

Nearly to the stage of writing the code purely on your own answers to my questions :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top