Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing menu bar caption dynamically
Message
De
05/05/2003 07:33:06
 
 
À
05/05/2003 00:04:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de menu & Menus
Divers
Thread ID:
00784771
Message ID:
00784827
Vues:
24
Hi Michael;

>It doesn't seem to be possible to change it based on certain context ( active form , active tab in a form and etc... ) Is constant releasing and redefining the only way to update menu bar caption ?
>
>RELEASE BAR GETBAR(..., lnbar) OF ...
>DEFINE BAR lnbar OF ... PROMPT newcaption AFTER lnbar-1
>
>
here we go:
cnmpad   = 'MyBest'
nCount   = CNTBAR(cnmpad)
wisthere = 0
For mi   = 1 TO nCount
    wnnnmmm  = GETBAR(cnmpad,mi)
    If  PRMBAR(cnmpad, GETBAR(cnmpad,mi)) = allt(mytable.descrip)
        If  MRKBAR(cnmpad, GETBAR(cnmpad,mi))
            wisthere = mi
        Else
            Set MARK OF bar mi OF mymenu TO .t.
            wisthere = mi
        Endif
    Else
        If  MRKBAR(cnmpad, GETBAR(cnmpad,mi))
            Set MARK OF bar mi OF mymenu TO .f.
        Endif
    Endif
Endfor
if  wisthere = 0
    Define BAR nCount+1 OF mymenu PROMPT allt(mytable.descrip);
        skip for awx = whatever   && your condition here
    Set MARK OF bar nCount+1 OF janelas TO .t.
endif
Show MENU ALL
HTH


Claudio
"Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, Ephesians 3:20
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform