Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to find Item Number on a menu?
Message
 
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01107544
Message ID:
01107817
Views:
24
Sergey,

Thank you so much for the update.

>The previous sample code will only work if bars are defined sequentialy starting with 1. Here's a more generic approach
>DEFINE PAD padTest OF _MSYSMENU PROMPT "Test"
>ON PAD padTest OF _MSYSMENU ACTIVATE POPUP popTest
>DEFINE POPUP popTest MARGIN RELATIVE COLOR SCHEME 4
>DEFINE BAR 10 OF popTest PROMPT '\<One'
>DEFINE BAR 20 OF popTest PROMPT '\<Two'
>DEFINE BAR 30 OF popTest PROMPT 'T\<hree'
>DEFINE BAR 40 OF popTest PROMPT '\<Four'
>FOR i = 1 TO CNTBAR('popTest')
>	IF PRMBAR('popTest', GETBAR('popTest',i)) = 'Two'
>		RELEASE BAR (GETBAR('popTest',1)) OF popTest
>		EXIT
>	ENDIF
>ENDFOR
>
>
>>Thank you, Sergey. This does the job.
>>
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform