Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Filling a TreeView
Message
De
27/01/2000 15:54:00
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Filling a TreeView
Divers
Thread ID:
00323786
Message ID:
00323786
Vues:
40
I am struggling a bit on filling a treeview. I can fill the root entries ok but get stuck on adding the child nodes. I have a view with mfg as the root and need to add model as childs to mfg. I have looked at the samples that came with VFP but it uses a recursive call that I want to avoid if possible. Any suggestions for the loop will help.
WITH This
  .oleEquipTree.ImageList = .oleImagesList
  lcMfgKey = "_M_" + EquipView.Mfg
  lcMfgText = EquipView.Mfg
  loLastNode = .oleEquipTree.Nodes.Add(,,lcMfgKey ,lcMfgText,lcImage ,lcSelectedImage)
  SKIP IN EquipView
  SCAN REST
    lcMfgKey = "_M_" + EquipView.Mfg
    lcModelKey = "_D_" + EquipView.Model
    lcMfgText = EquipView.Mfg
    lcModelText = EquipView.Model
    DO CASE
      CASE NOT loLastNode.Key = lcMfgKey
        * Gotta be a root entry I hope
        loLastNode = .oleEquipTree.Nodes.Add(,, lcMfgKey, lcMfgText,lcImage ,lcSelectedImage)
      CASE NOT loLastNode.Key = lcModelKey
        * This Part gives me like keys!!
        loLastNode = .oleEquipTree.Nodes.Add(lcMfgKey,4, lcModelKey, lcModelText,lcImage ,lcSelectedImage)			
      ENDCASE
...
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform