Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set bar of ... is working
Message
De
16/12/1997 14:34:19
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00066261
Message ID:
00066328
Vues:
42
>>>>>>>>Thanks George.. Your example helped me
>>>>>>>>and now it works. I have two bars that
>>>>>>>>will be using the check mark. How do I
>>>>>>>>test to see if there is a check on bar 1 or 2?
>>>>>>>>If bar 1 or bar 2 is checked, I will call a function.
>>>>>>>>thanks rob
>>>>>>>
>>>>>>>Rob,
>>>>>>>
>>>>>>>Since a global object or variable is required, anything along the lines of
>>>>>>>
>>>>>>>IF gOWhatever.Mark1 OR gOWhatever.Mark2
>>>>>>>* Call the function
>>>>>>>ENDIF
>>>>>>>
>>>>>>>Or use an array with:
>>>>>>>
>>>>>>>IF ASCAN(a_marks, .T.) # 0
>>>>>>>* Call the function
>>>>>>>ENDIF
>>>>>>>
>>>>>>>Should work fine.
>>>>>>>
>>>>>>>However, I would call such a routine only after the call to change the state of the variable. In this way the variable always represents the most recent status.
>>>>>>>
>>>>>>>George
>>>>>>So, what your are saying is, if I use two menu options that
>>>>>>need to be checked or unchecked, I should use two globals. Right?
>>>>>
>>>>>Yep, see the other thread.
>>>>OK - I got it... vfp50 could of made things easier....
>>>>thanks again .. :))))))
>>>
>>>Yeah, they could've made the menu an object and given us access to various properties, such as this one. Not to make your life tougher, but here's something to look out for.
>>>
>>>If you use PUSH/POP MENU, the state of the mark can easily get out of sync with the state of the variable. For example, call the menu, mark the bar, push the menu on the stack, unmark the bar, pop it back off, and...Yep, the bar's marked again. If you use this technique, re-set the marking's immediately after POP MENU...
>>>
>>>BTW, You can get the state of an individual bar with MRKBAR().
>>>
>>>George
>>Thanks for the news... I know I call SHOW MENU ALL in the function that
>>resets the menu bars, but where do I initialize it. I want one of the bars
>>to be checked at load time.
>
>Immediately after the variable's initialized to .F. and you've executed DO Mymenu.mpr, you can call the routine to toggle the state of the mark, just as if the user had clicked on it.
I did and it works... thanks for the help... I should of been a doctor...:)))
Robert Keith
Independent Developer
San Antonio, Texas
E-mail address:
rebelrob1@yahoo.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform