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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Menu Problems

Status
Not open for further replies.

Wendz

Programmer
Aug 9, 2000
47
PH
HI! I'm a programmer which was assigned to work on a program regarding an Information System. I have a problem regarding handling of menus. The enabling of menu depends on the codes via access on passwords. There are different levels on the access and some of its access requires disabling of menus upon initialisation or some of the pads. I have browsed on some resources but it can't find something that discusses menu in a more detailed way. By the way I am using a menu builder to create a menu. Your help will mean a lot! More Power!
 
Hi Wendz, I recently started needing to make my menus adaptable like you and found that the menu builder isn't much use.<br>I found that the menu builder creates a program with the extension mpr. If you type <font color=red>modi comm <i>nnnnn</i>.mpr</font> you can see the syntax used to build the menu.<br>You can save this to another file and then you can determine which parts of the menus to disable and what the prompts should say. I also found VFP's help <u>fairly</u> helpful.<br><br>This was a big break for me - Stewart
 
I build my menu's from scratch.&nbsp;&nbsp;I've been using fox since the dos days... so old habits die hard.&nbsp;&nbsp;The SKIP option allows you to customize menu behavior on the fly.&nbsp;&nbsp;Sometimes I have a series of booleans that must be satisfied to activate a menu bar or a specific bar.<br><br>Pads are the top layer of menus<br>define your pads...<br>activate your pads...<br>add bars to pads...<br>set actions to bars...<br>and thats pretty much it.<br><br>SET SYSMENU AUTOMATIC<br>*Define Menu Pads<br>DEFINE PAD FILE OF _msysmenu PROMPT &quot;\&lt;File&quot; ;<br>&nbsp;&nbsp;BEFORE _medit <br>DEFINE PAD manage OF _msysmenu PROMPT &quot;\&lt;Manage&quot; ;<br>&nbsp;&nbsp;AFTER _medit ;<br>&nbsp;&nbsp;SKIP FOR EMPTY(m.open_proj)<br><br>*Define PAD actions<br>ON PAD FILE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OF _msysmenu ACTIVATE POPUP FILE<br>ON PAD manage&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OF _msysmenu ACTIVATE POPUP manage<br><br><br>*File Menu<br>DEFINE POPUP FILE MARGIN RELATIVE <br>DEFINE BAR 1 OF FILE PROMPT &quot;\&lt;New&quot; ;<br>&nbsp;&nbsp;&nbsp;KEY ctrl+N, &quot;Ctrl+N&quot; ;<br>&nbsp;&nbsp;&nbsp;SKIP FOR TYPE('mybrowse.tag') &lt;&gt; &quot;U&quot;<br>DEFINE BAR 2 OF FILE PROMPT &quot;\&lt;Open&quot; ;<br>&nbsp;&nbsp;&nbsp;KEY ctrl+o, &quot;Ctrl+O&quot; ;<br><br>*Manage Menu<br>DEFINE POPUP manage MARGIN RELATIVE<br>DEFINE BAR 1 OF manage PROMPT &quot;\&lt;Information&quot;<br><br>*File menu actions<br>ON SELECTION BAR 1 OF FILE DO add_proj.prg<br>ON SELECTION BAR 2 OF FILE DO open_it.prg <br><br>*Manage menu actions<br>ON SELECTION BAR 1 OF manage DO FORM ManInfo.SCX<br><br>Hope this example is useful! <p> <br><a href=mailto:blindpete@mail.com>blindpete@mail.com</a><br><a href= > </a><br>
 
Another option is to build your security-sensitive menu options dynamically, with&nbsp;&nbsp;everything else built statically.<br><br>For example, use the Menu Builder to create your standard, non-security-related menu choices.&nbsp;&nbsp;Then, in the Menu Builder's Cleanup snippet (View, General, Cleanup) add code that tests for the security condition, then adds the menu choice to the appropriate popup if desired. <p>Robert Bradley<br><a href=mailto: > </a><br><a href= - Visual FoxPro Development</a><br>
 
Thank you guys for the quick and effective examples and reponses. Even I know a little about creating it manually. I thought using the menu builder can make it faster. Although the suggestions of Robert was good but I have never tried it before since I am not very familiar with creating standards on the menu builder and adding non-security related menu choices.
 
I have a strange issue with _msysmenu. I work about 50/50 from the office and at home. At both locations I am using the same manufacturer, model and size of monitor. I have both set to a resolution of 1280 x 1024. Here is my issue. At my home work station, _msysmenu is using a much larger font than compared to my office work station. Also, the custom menu designed for the application I'm working on has the same large font size. It is annoying because of the number of pads in the custom menu are causing the menu to switch to two lines at certain time. For instance, if I modify a report, the "Report" tab causes the menu to switch to two lines. For the life of me, I cannot figure out what the difference is between the VFP environment that would cause this. I have seen the KB article on how to work around this, I tried it, bit it did not affect the menu, besdes according to the VFP help file:
"The FONT clause is ignored for menu titles added to the Visual FoxPro system menu _MSYSMENU."

Anyone have some Ideas?
 
Sorry, I posted the previous post by mistake. I wanted to start a new post.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top