[futurebasic] Re: Best way to remove menu items?

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : March 1998 : Group Archive : Group : All Groups

From: GBeckman <GBeckman@...>
Date: Mon, 16 Mar 1998 09:28:15 EST
In a message dated 3/16/98 2:04:40 PM, you wrote:

>FOR x = 1 to fileCount
>MENU 6, x, _disable, ""
>NEXT x

Your routine will gray the menu

If you want it to go away completly try somthing like this:

    myMen&=FN GETMHANDLE(_SubjectsMenu)
    NumOfItems= FN COUNTMITEMS(myMen&)               'how many?
    FOR x=numOfItems TO 1 step -1                    'clear them
      CALL DELMENUITEM(myMen&,x)
    NEXT x


	Notice that I am counting from the high menu number down to the lower.  If
you go from 1 up to numOfItems, it can cause headaches.  When you delete #1,
then #2 becomes #1 and you will spend a lot of time trying to figure out why
some are never deleted?


Hope this helps,
GB