Have you looked into using Andrew Ross MacNeil's GenmenuX?

--

rk
-----Original Message-----
From: ProfoxTech [mailto:[email protected]] On Behalf Of 
[email protected]
Sent: Thursday, July 17, 2014 9:52 AM
To: [email protected]
Subject: Re: Trying to dynamically add menu item and contents at runtime

On 2014-07-17 04:22, Laurie Alvey wrote:
> I think you have to do it like this:
> 
> DEFINE PAD mypad OF _MSYSMENU......
> ON PAD mypad OF _MSYSMENU ACTIVATE POPUP mypopup DEFINE POPUP mypopup 
> MARGIN RELATIVE SHADOW COLOR SCHEME 4 DEFINE BAR 1 OF mypopup PROMPT 
> "\<Do Something"
> ON SELECTION BAR 1 OF mypopup do form dosomething.scx
> 
> Laurie


Hi Laurie,

I've got it working now with the code below, but rather than have it appended 
to the far right (last) column, I need to learn now how to reposition it so 
it's the FIRST menu item.  Having it to the right of my Exit menu item (from 
the regularly IDE-built menu) just looks wrong.

                *** mjb 07/15/2014 - create menu dynamically (thanks ProFox for 
help!)
                DEFINE PAD _4461bpo4m OF _MSYSMENU PROMPT "\<Location" COLOR 
SCHEME 3 KEY ALT+L, ""
                ON PAD _4461bpo4m OF _MSYSMENU ACTIVATE POPUP location
                DEFINE POPUP location MARGIN RELATIVE SHADOW COLOR SCHEME 4
                loBiz.GetNailerLocations("curNailerLocations")
                SELECT curNailerLocations
                SCAN
                        liCnt = CNTBAR("Location")
                        lcCmd = [DEFINE BAR ] + ALLTRIM(STR(liCnt+1)) + [ OF 
Location PROMPT "] + ALLTRIM(curNailerLocations.cDescription) + ["]
                        &lcCmd
                        lcCmd = [ON SELECTION BAR ] + ALLTRIM(STR(liCnt+1)) + [ 
OF Location oUtils.SetLocation("] + ALLTRIM(curNailerLocations.cLocID) + [")]
                        &lcCmd
                        lcCmd = [SET MARK OF BAR ] + ALLTRIM(STR(liCnt+1)) + [ 
OF Location TO (oUtils.cLocationID = "] + ALLTRIM(curNailerLocations.cLocID) + 
[")]
                        &lcCmd
                ENDSCAN
                ON PAD _4461bpo4m OF _MSYSMENU ACTIVATE POPUP location


[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/DF1EEF11E586A64FB54A97F22A8BD04423A2B815EF@ACKBWDDQH1.artfact.local
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to