Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dbi-Tech toolbar Control
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00778993
Message ID:
00779017
Vues:
32
This message has been marked as the solution to the initial question of the thread.
Hi Bob.

>It looks excellent, but we are not having any luck
getting a drop down menu to work. One of the options
is to set the Button Type as a Drop down, but I
have searched high and low trying to find how I
tie a button to this "Drop Down" menu??


I used this control in an application recently and data-drve its creation. Here is the code from my class that adds an item to the menu:

FWIW, I leave the Button Type as 0. If you set the Button Type as Drop Down it just displays a little down arrow on that menu pad. Leaving the button type as 0 will still drop down the menu.
*!* First see if this is a top level menu item or an
*!* item in a lower level
IF MenuItems.iLevel = 1
  *!* Top level item
  lnIndex = This.AddItem( MenuItems.iItemType, lcItemText, 0 )
  WITH This
    .ItemTextPosition( lnIndex ) = 4  && Right 
    .ItemFixedWidth( lnIndex ) = .T.
    .ItemButtonWidth( lnIndex ) = MenuItems.iWidth
    
    *!* Item tips only display for top level items
    This.ItemTips( lnIndex ) = lcItemTips 

  ENDWITH
ELSE
  *!* the index of the parent button was passed in as a parameter
  lnChild = This.LastChildIndex( tiIndex )
  lnIndex = This.InsertItem( MenuItems.iItemType, lcItemText, MenuItems.iImageID, lnChild + 1 )
  This.ItemLevel( lnIndex ) = MenuItems.iLevel
ENDIF
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform