Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

popup menu problem

Status
Not open for further replies.

FoxStudent

Technical User
Feb 24, 2000
85
GB
How do I get this popup menu to deactivate when I choose one of the options on it?<br><br>Thank You<br>Grainne Evans<br><br>set color to n/w+<br>do setupenv<br>do initialise<br>define popup mainmenu from 10,10 to 15,25<br>define bar 1 of mainmenu prompt &quot;&nbsp;&nbsp;New Sale&quot;<br>define bar 2 of mainmenu prompt &quot;&nbsp;&nbsp;Delivery&quot;<br>define bar 3 of mainmenu prompt &quot;&nbsp;&nbsp;Maintenance&quot;<br>define bar 4 of mainmenu prompt &quot;&nbsp;&nbsp;Quit&quot;<br>on selection popup mainmenu do exemain<br>do while .t.<br> clear<br> do titlemain<br> set color to w+/b<br> activate popup mainmenu<br>enddo<br>clear<br>clear all<br><br>procedure initialise<br>store .f. to&nbsp;&nbsp;m.finished<br>public m.parttype<br>public m.manufact<br>public m.model<br>public m.specific<br>public m.engsize<br>public m.engnum<br>public m.framenum<br>public m.year<br>public m.curlevel<br>public m.optlevel<br>public m.minlevel<br>public m.reordlev<br>public m.sup_part<br>public m.suppcode<br>public m.isleno<br>public m.binno<br>return<br><br>procedure titlemain<br>set color to n/w+<br>set border to double<br>@4,10 to 8,25<br>@4,10 fill to 8,25<br>@6,14 say &quot;Main Menu&quot;<br>set border to<br>set color to n/w <br>return<br><br>procedure exemain<br>do case<br> case bar() = 1<br> do newsale<br> case bar() = 2<br> do delivery<br> case bar() = 3<br> do maintena<br> case bar() = 4<br> set color to w+/n<br> store &quot;&quot; to exitnow<br> define window exitnow from 18,8 to 22,58 title 'Are you sure you want to exit?'<br> activate window exitnow<br> store &quot;&quot; to exitnow<br> @2,5 get exitnow picture '@*h Yes;No'<br> read<br> release window exitnow<br> if exitnow = &quot;Yes&quot;<br> quit<br> endif<br> set color to n/w+<br>endcase<br>clear<br>deactivate popup mainmenu<br>clear all<br>do restenvi<br>release all<br>return<br>
 
Not so sure about FPW, but when I removed the non-included procedure call initialise and removed the line DO WHILE .T. & ENDDO it worked.  I plugged in CANCEL for your calls that aren't provided here.  BTW< I don't think your last 9 lines will ever fire since QUIT is executed before them<br>John Durbin
 
Actually, the menu <b>is</b> deactivated every time you run it.&nbsp;&nbsp;Put a SET STEP ON at the beginning and watch.&nbsp;&nbsp;The DEACTIVATE POPUP executes and the menu disappears.&nbsp;&nbsp;BUT the DO WHILE .T. loop reactivates the menu.<br><br>If you want to hide the menu while processing one of the menu options then use the HIDE POPUP command.<br><br>As for JDurbins point about the last 9 lines:&nbsp;&nbsp;The quit is in a case..endcase structure; therefore, the last nine lines of exemain will execute unless the user selects quit. <p>Mike Wood<br><a href=mailto:mwood@awod.com>mwood@awod.com</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top