Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Regarding Tip: Control Valid() Fires Even When Read-Only
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00781549
Message ID:
00781903
Vues:
13
Is the requirement to prevent a textbox control from receiving focus?

>In the May 2003 issue of the FoxPro Advisor there is a tip called "Control Valid() Fires Even When Read-Only." It made perfect sense so I added it to my base textbox class. My problem is how to handle the RETURN .T. in the base class so processing stops. In a subclassed textbox, I have DODEFAULT() to call the base class code but after the code runs, it still processes the code of the subclassed textbox.
>
>Example:
> txtBase.Valid()
>
>   **********************************************************************************
>   * Code from "Control Valid() Fires Even When Read-Only" - FoxPro Advisor, May 2003
>   **********************************************************************************
>   IF THIS.READONLY
>      RETURN .T.
>   ENDIF
>   **********************************************************************************
>
>   *  NOTE: If ReadOnly = .F., still returns .T.
>
>
> txtSubClass.Valid()
>
>   DODEFAULT()
>
>   * If the control is ReadOnly, I don't want this to occur!
>   IF EMPTY(THIS.VALUE)
>      RETURN .F.
>   ENDIF
>
>
>What's a common way to handle this?
>
>Thanks,
>Aaron
Imagination is more important than knowledge
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform