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

Checkmarking the menu bar 2

Status
Not open for further replies.

IRABYY

Programmer
Apr 18, 2002
221
US
Checkmarking the menu bar was easy in the early FoxBase/FoxPro days when you could just code something like

DEFINE BAR lnBarNo OF mpuPrint PROMPT &quot;Attach \<Notes To Printout&quot;
SET MARK OF BAR lnBarNo OF mpuPrint TO .F. && Initially - no check mark.


But in VFP a) menus defined in the code look ugly, b) the placement of the drop-down sub-menus is still in lines instead of in pixels - or whatever - and so on.

By using Menu Designer deprives us of the control we used to have when we did it ourselves in code. In particular, how do I set the check/un-check capability for the menu bar in the menu designed with Menu Designer? I could not find it there, folks! Am I missing something? I mean - I don't wanna go to .mpr file and correct it's code manually, it usually renders &quot;unpleasant&quot; results.

Any suggestions anybody?

Thanks!

Ilya
 
I'm not sure what you mean by &quot;menus created in code are ugly&quot;. I never use the menu designer and all my menus look identical to standard Windows menus. Were you using FONT commands on you menus in code?
 
Yeah, I did, in VFP 3.0. That's where it was ugly. So I decided to use Menu Designer for my next product made in VFP 7.0.

Regards,

Ilya
 
It was the FONT clause, not the fact that it's done in code, that made those menus ugly.

Try this command:
set mark of bar _mfi_new of _mFile to .t.

It'll put a check mark next to your &quot;New&quot; menu item in the standard file menu. The help says that the MARK clause of the DEFINE PAD command is ignored if the menu is integrated with the system menu (presumably because the standard windows checkmarks are used). There is no need to define individual menu pads as being &quot;Check&quot;-able... just make the code that the pad runs execute the SET MARK OF... command for the appropriate menu item.
 
Thank you, wgcs!
It does work!
Even though I have to open the .MPR file to take the name of the menu and bar No. - it's no big deal.

Thank you very much!

Regards,

Ilya
 
Keep in mind that if you make your own menu, you have to give each menu item a Pad Name if you wish to be able to refer to it later. Otherwise VFP will just assign it a random one every time it recompiles.

Ian
 
Yes, Ian, I know VFP gives it some off-the-wall name, but I have noticed it keeps the pad's name consistent, that is once the Menu Designer assigns the pad's name it does not change it on recompiling.

OTOH, I'd like to know if it's possible with Menu Designer in VFP 7.0 to assign the pad's name by means other than getting into .MPR file with my &quot;dirty hands&quot; [smile] and re-typing the pads' names by myself. As I have mentioned before it just does not work.
Any hint anybody?

Ilya
 
Yes, there is. Click the button for Options. Down near the bottom, just above comments, is a spot for you to specify Pad Name. :eek:)

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top