Joe,
It's not the only way, but it certainly is the quickest way as without using
classes you would have to long hand code each textbox or use copy/paste in
the designer once you got one field working. The great thing about using a
class is that it is a one step cures all solution with one point for the
"bespoke" validation coding i.e in the class itself.

Many people are initially put off by the thoughts f rolling their own
classes but once you have done it once you'll appreciate the flexibility of
being able to subclass even your bespoke classes to any level if required.

Dave Crozier


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf
Of Joe Yoder
Sent: 22 December 2008 12:38
To: [email protected]
Subject: Re: Newbee - working with a programmatically created text box

Thanks for the answer.  I have never fully understood the process off 
defining my own classes.  I thought in this case I could simply use an 
existing class but could not figure out how to set the Valid function.  
Do I understand correctly that the only way to control such functions is 
to define my own class?  Thanks - Joe

On Sunday, December 21, 2008 11:33 PM, MB Software Solutions General 
Account wrote:
>
>Date: Sun, 21 Dec 2008 23:33:02 -0500 (EST)
>From: MB Software Solutions General Account
>To: [email protected]
>cc:
>Subject: Re: Newbee - working with a programmatically created text box
>
>Joe Yoder wrote:
>> I like the approach used by QuickBooks where pressing a mathematical
>operator in a numeric field brings up a mini worksheet where one can do
>math on the value in the field.  I'm working a similar implementation
>for time entry.
>>
>> A text box overlays a field used for time entry when a plus or minus
>operator is pressed in that field.  The text box expands to display a
>separate line for each value added or subtracted from the original value
>and serves as a mini worksheet.  When the entry is complete and the user
>presses the "Enter" key,  The text box is eliminated and the result of
>the math on the worksheet is entered in the original text field.
>>
>> I need to force all entry into the worksheet until it is complete so
>that program can finish the calculation and close the worksheet.  I
>think setting the valid as always false until an "Enter" is pressed will
>give the desired result.
>>
>> Can someone enlighten me about how to set the Valid function on a
>programmatically created text box?  Suggest a better approach?
>>
>
>
>Hi Joe,
>
>If you're "stickbuilding it" by creating it in a PRG, just define the
>Valid event of your class.
>
>DEFINE CLASS cboSample as Combobox
>
>       FUNCTION Valid
>       * This code runs just like it would if you set the code inside a VCX
object
>       ENDFUNC
>
>ENDDEF
>
>
>
>
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/1dc3ffe2f3414c6f8f1872a0b58bb...@develop
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to