Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Windows tree
Message
De
18/06/2007 09:31:33
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
18/06/2007 09:13:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01233868
Message ID:
01233892
Vues:
13
>Hi Cetin,
>
>wel i dont now the activex that you are talking about. But the function is simple. what is has to do is a display of an number of 'items' when i click on one item or the plus in front of it. a get a subdivision of the item with a + infront of it and so i can drill down to the info i want to see. its like the windows explorer but instead of directories the user can drill down a set of choses to get a final answer :).


Yes it's called treeview (what exlorer has in its left pane):
#define tvwFirst	0
#define tvwLast	1
#define tvwNext	2
#define tvwPrevious	3
#define tvwChild	4

create cursor myTree (nodeId c(10), parentID c(10), nodeText c(50))
insert into myTree values ( "root1", "", "This is root#1")
insert into myTree values ( "root2", "", "This is root#2")
insert into myTree values ( "root3", "", "This is root#3")

insert into myTree values ( "r1c1","root1", "This is child 1 of root#1")
insert into myTree values ( "r1c2","root1", "This is child 2 of root#1")
insert into myTree values ( "r1c3","root1", "This is child 3 of root#1")

insert into myTree values ( "r2c1","root2", "This is child 1 of root#2")

insert into myTree values ( "r1c2c1","r1c2","This is child 1 of root#1-child1")


public oForm
oForm = createobject('myForm')
with oForm
  with .Tree
    scan
      if empty(parentID)
        .Nodes.add(,tvwFirst,trim(nodeID),nodeText)
      else
        .Nodes.add(trim(parentID),tvwChild,trim(nodeID),nodeText)
      endif
    endscan
  endwith
  .show()
endwith


define class myForm as form
Height = 200
Width = 400
  add object Tree as olecontrol with ;
    name = 'Tree',oleclass='MSComCtlLib.TreeCtrl'

  procedure init
    with this.tree
      .linestyle = 1
      .font.name = 'Times New Roman'
      .font.size = 10
      .indentation = 5
      .Height = 200
      .Width = 400
    endwith
  endproc

  procedure Tree.NodeClick
    lparameters oNode
    wait window 'Node clicked '+oNode.Key timeout 3
  endproc
enddefine
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform