Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IsNumeric - VFP analogue?
Message
De
26/12/1999 22:55:05
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00307922
Message ID:
00308692
Vues:
42
This message has been marked as a message which has helped to the initial question of the thread.
>Dragan,
>>>
>>>You're welcome. My point is simply that you could provide the same ease of entry using another control that would provide for better validation for you.
>>>
>>>You could create a container class with a fixed number of textboxes that have their borders turned off and it would look exactly like the editbox without scrollbars in it but each textbox would fire its valid with one discrete value in it for you to check. If all the textobxes needed the same validation you could easily add a method to the container and have each textbox call teh containers method from its own valid.
>>
>>
>>Or, maybe a combination of a textbox and a listbox - so whatever you type in the textbox gets validated in it, and goes to the listbox. I've seen this sort of interface in several places, and it's not that bad at all. In the listbox's rightclick you may have the 'remove' method, or a 'remove selected' button below the listbox.
>>
>>It's been said, if it can't be done in at least three ways...
>
> You're right. You know, the more I think about these approaches, the more I like them. It's honestly... After Ed wrote his letter, explaining me details about grid class, I was thinking about it. I thought at night and it became clear for me how to define such class in the morning. I have this code in my mind using NewObject method to substitute regular textbox with my class textbox in Init method. I also need to have property CursorName and create cursor in Init method. I may also use logical property CloseCursor, to close it explicitly in Grid Destroy method, etc. BTW, I already made these changes for btcc_multilist class, so, I may do it in parent class instead, because code is the same for both grid and listbox.
>

You aren't thinking far enough ahead - this sort of data entry control (a container object, that can hold n occurences of an instance of another control) is a pattern that recurs constantly. This should go into a standard toolkit for you so that you simply drag the control to a form, set a few properties, and use the same idea over and over again for almost anything that fits this model of data collection.

> I also like now the idea of textbox+listbox, which was originally suggested by Ken Weber. BTW, I even think, that this approach and grid approach don't require necessarily command buttons. We can place code in KeyPress method, which would handle this. But may be command buttons're just fine, I haven't decided yet.
>

Whatever you like; the buttons themselves wouldn't do any more than make a call to the container's custom AddItem() and DeleteItem() methods. The stuff that gets handled by the container (from my POV) is list navigation and context validation of well-formed values returned by the input control in the container.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform