Information générale
Catégorie:
Gestionnaire d'écran & Écrans
>>Naomi,
>>
>>>I was just thinking that I would have to use character, e.g. unbind in gotfocus, let the user type, then replace in lostfocus...
>>
>>FWIW, Megafox book has an extensive numeric-textbox class for calculator-type input, and it relies generally
>>on this approach. I use the Visual FoxExpress framework, and could not make it work acceptably
>>within that context. I ended up implementing an unbound character-type numeric textbox that, in turn,
>>updates a bound numeric textbox with Visible=.F. On the minus side, I did not like having to settle for
>>using 2 controls for a single task. On the plus side, I was able to fine-tune very well the character-type
>>numeric textbox to trap invalid user input and issue detailed error messages.
>>
>>-mark
>
>Mark,
>
>Have you been able to implement your class in the grid? Do you instantiate one of the classes on the fly?
>
>Can you please elaborate more on your approach?
(1) I never use grids for data entry, so I have not tried to implement it in a grid.
(2) I have not tried instantiating it on the fly.
Basic VFE tiers include cursor, data environment, business object, presentation object and form, and
I've just been dropping instances of the class on the presentation object (which is a container) as needed --
i.e., one for each numeric textbox on the PO. For each instance, I simply set a cAssociatedControl prop to the name of
the numeric textbox that gets updated.
Because I've coded the class to work with the (modified) way I do things in the VFE context (and it is a sub-sub-class of
VFE's default textbox control), the code would not be straightforwardly transferable even to someone else using VFE.
But I can certainly pull together a description of the relevant PEMs and some code snippets if you really think they
would be useful to you.
-m.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement