Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Data-driven POPUP-menu's
Message
De
18/12/2001 10:38:59
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
18/12/2001 09:22:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de menu & Menus
Divers
Thread ID:
00595560
Message ID:
00595605
Vues:
26
>>Has anybody tips ?
>>
>>I wan't the user select an article from a popup menu.
>
>Sorry I pressed the send button to fast.
>
>
>The structure of the popup should be like this :
>
>
      ->'Add article'
>                -->suplier1
>                      -->group1
>                            -->ArticleId
>                                ...
>                      -->group2
>                           ...
>                -->suplier2
>                ...
>      ->'remove article'
>
>Is this possible ?

Not quite sure about the indentation - if you really need to have it all indented, you may better use TreeView control, and there are several examples here in the downloads on how to make a data-driven TreeView.

If you want to have a data-driven popup, you'd have to use some macro expansion. The pesoudocode would look like this:
Define popup (cPopupName)
i=0
scan
   i=i+1
   DEFINE BAR i OF (cPopupName) PROMPT (youralias.cPrompt)
   ON SELECTION BAR i OF (cPopupName) DO {macro with the command here}
endscan
So you just need a table with bar captions, and, in your case, article names - your command would be "Do OpenArticle with 'thearticle.doc'" where you would have to store the article name into a variable and then have that variable macroexpanded between quotation marks. Keep in mind that a popup runs pretty much unaware of the rest of the world - it won't know any variables you had when you defined it, so the On Selection line must have literals, not variables in its clauses. This means the macros you use must evaluate into simple expressions without embedded variables. They may, however, include function calls, which then does give you some liberty, but the parameters to these calls, again, can not be variables.

Well, they can, if the variables are public, but that's simply not a good thing to use.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform