Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SET SKIP OF BAR question
Message
De
17/11/2006 09:15:42
 
 
À
16/11/2006 15:28:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01170464
Message ID:
01170677
Vues:
11
>Does anyone know how to use the SET SKIP OF BAR when the menu already has a SKIP FOR clause?
>
>e.g.
>
>This would be defined in the menu.MPR. If something() returns true, then the item is disabled otherwise it is enabled.
>
>
>DEFINE POPUP file MARGIN RELATIVE SHADOW COLOR SCHEME 4
>DEFINE BAR 1 OF file PROMPT "\<Test" ;
>	SKIP FOR Something()
>
>
>
>In your form INIT code you would use something like the following:
>
>
>SET SKIP OF BAR 1 OF file .T.
>
>
>Here we want to disable the first item in the file menu. If Something() is returning false, even with the SET SKIP OF BAR telling it to be TRUE, the first item will still be enabled.
>
>Does anyone know how to get around this?

VFP evaluate Something() every time the popup is showed or painted,
this overwrite the skip flag.

Then you can't control the bar with a SET SKIP when a SKIP FOR is defined.

Solution1:
put the init logic within the Something() procedure

Solution2:
- start with
DEFINE BAR 1 OF file PROMPT "\<Test"
- apply the init skip flag
- when you want to activate the Something() procedure,
redefine the bar
DEFINE BAR 1 OF file PROMPT "\<Test" ;
	SKIP FOR Something()
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform