Skip to main content

[archive] Microsoft TreeView Control

  • February 13, 2003
  • 6 replies
  • 0 views

[Migrated content. Thread originally posted on 11 February 2003]

Hello,
I am after a bit of help if possible. I am attempting to incorporate the Microsoft treeview Control (Active-x Control) into my Acucobol-GT application. What I am ultimately aiming at is to have two or three Treeview controls on one screen and be able to drag and drop items between Treeviews.

However, I am struggling at the moment to be able to even populate one treeview let alone multiples.

Has anybody got any experience of usuing this control within Acucobol. I can accomplish it quite easily using Visual Basic, but I do not want to develop in this as all of our applications are developed in Acucobol-GT

6 replies

[Migrated content. Thread originally posted on 11 February 2003]

Hello,
I am after a bit of help if possible. I am attempting to incorporate the Microsoft treeview Control (Active-x Control) into my Acucobol-GT application. What I am ultimately aiming at is to have two or three Treeview controls on one screen and be able to drag and drop items between Treeviews.

However, I am struggling at the moment to be able to even populate one treeview let alone multiples.

Has anybody got any experience of usuing this control within Acucobol. I can accomplish it quite easily using Visual Basic, but I do not want to develop in this as all of our applications are developed in Acucobol-GT
If no one has a sample to post, pls post the extract of the VB code that populates one node, and we can look at it together to translate it to ACUCOBOL-GT

[Migrated content. Thread originally posted on 11 February 2003]

Hello,
I am after a bit of help if possible. I am attempting to incorporate the Microsoft treeview Control (Active-x Control) into my Acucobol-GT application. What I am ultimately aiming at is to have two or three Treeview controls on one screen and be able to drag and drop items between Treeviews.

However, I am struggling at the moment to be able to even populate one treeview let alone multiples.

Has anybody got any experience of usuing this control within Acucobol. I can accomplish it quite easily using Visual Basic, but I do not want to develop in this as all of our applications are developed in Acucobol-GT
If no one has a sample to post, pls post the extract of the VB code that populates one node, and we can look at it together to translate it to ACUCOBOL-GT

[Migrated content. Thread originally posted on 11 February 2003]

Hello,
I am after a bit of help if possible. I am attempting to incorporate the Microsoft treeview Control (Active-x Control) into my Acucobol-GT application. What I am ultimately aiming at is to have two or three Treeview controls on one screen and be able to drag and drop items between Treeviews.

However, I am struggling at the moment to be able to even populate one treeview let alone multiples.

Has anybody got any experience of usuing this control within Acucobol. I can accomplish it quite easily using Visual Basic, but I do not want to develop in this as all of our applications are developed in Acucobol-GT
Does anyone have an answer to this post? I am trying to convert the treeviews I use to the Microsoft Treeview activex control. I am also strugling with populating the tree and have a couple of questions about different controls and what they mean. Does anyone know if there is documentation on the Microsoft Treeview active x control?

Thanks,

[Migrated content. Thread originally posted on 11 February 2003]

Hello,
I am after a bit of help if possible. I am attempting to incorporate the Microsoft treeview Control (Active-x Control) into my Acucobol-GT application. What I am ultimately aiming at is to have two or three Treeview controls on one screen and be able to drag and drop items between Treeviews.

However, I am struggling at the moment to be able to even populate one treeview let alone multiples.

Has anybody got any experience of usuing this control within Acucobol. I can accomplish it quite easily using Visual Basic, but I do not want to develop in this as all of our applications are developed in Acucobol-GT
Here is an example of how to use the Microsoft TreeView control. The example does not show how to perform a drag and drop between the two, because the TreeView control does not support automatic drop, this has to be implemented manually. ACUCOBOL-GT does not currently support this operation which involves the IDataObject.

       IDENTIFICATION               DIVISION.
       PROGRAM-ID.                  MSTREEV.
       ENVIRONMENT                  DIVISION.
       CONFIGURATION                SECTION.
       SPECIAL-NAMES.
           COPY "MSTREEV.DEF".
           .
       WORKING-STORAGE SECTION.
       77  CNTL-FONT                USAGE HANDLE OF FONT SMALL-FONT.
       77  KEY-STATUS               IS SPECIAL-NAMES
           CRT STATUS               PIC 9(4) VALUE 0.
           88  EXIT-PRESSED         VALUE 27.
       77  ANode                    HANDLE OF NODE.
       SCREEN      SECTION.
       01  TEMPLATE-SCREEN.
           03 Tree1                 @TreeView
              LINE                  02
              COL                   02
              SIZE                  35
              LINES                 11.
           03 Tree2                 @TreeView
              LINE                  02
              COL                   42
              SIZE                  35
              LINES                 11.
           03 PUSH-BUTTON
              LINE                  13.5
              COL                   63
              SIZE                  14
              TITLE                 "E&xit"
              SELF-ACT
              EXCEPTION-VALUE       = 27.
       PROCEDURE DIVISION.
       MAIN-LOGIC.
           DISPLAY STANDARD         GRAPHICAL WINDOW
                   TITLE            "Template"
                   CONTROL          FONT CNTL-FONT
                   SIZE             80
                   LINES            15
                   BACKGROUND-LOW
           DISPLAY TEMPLATE-SCREEN
           PERFORM POPULATE-TREEVIEW
           PERFORM WITH TEST AFTER  UNTIL EXIT-PRESSED
                   ACCEPT           TEMPLATE-SCREEN
           END-PERFORM
           DESTROY TEMPLATE-SCREEN
           STOP    RUN
           .
       POPULATE-TREEVIEW.
      *Populate Tree 1
           MODIFY  Tree1            Nodes::Add(
                   BY NAME Key "R1",
                   BY NAME @Text "Root 1")
                   GIVING           ANode
           MODIFY  Tree1            Nodes::Add(
                   BY NAME Relative "R1",
                   BY NAME Relationship tvwChild,
                   BY NAME Key "C11",
                   BY NAME @Text "Child 1.1")
           MODIFY  Tree1            Nodes::Add(
                   BY NAME Relative "R1",
                   BY NAME Relationship tvwChild,
                   BY NAME Key "C12",
                   BY NAME @Text "Child 1.2")
           MODIFY  Tree1            Nodes::Add(
                   BY NAME Relative "R1",
                   BY NAME Relationship tvwChild,
                   BY NAME Key "C13",
                   BY NAME @Text "Child 1.3")
           MODIFY  Tree1            Nodes::Add(
                   BY NAME Relative "R1",
                   BY NAME Relationship tvwChild,
                   BY NAME Key "C14",
                   BY NAME @Text "Child 1.4")
           MODIFY  ANode            Expanded = 1
      *Populate Tree 2
           MODIFY  Tree2            Nodes::Add(
                   BY NAME Key "R2",
                   BY NAME @Text "Root 2")
                   GIVING           ANode
           MODIFY  Tree2            Nodes::Add(
                   BY NAME Relative "R2",
                   BY NAME Relationship tvwChild,
                   BY NAME Key "C21",
                   BY NAME @Text "Child 2.1")
           MODIFY  Tree2            Nodes::Add(
                   BY NAME Relative "R2",
                   BY NAME Relationship tvwChild,
                   BY NAME Key "C22",
                   BY NAME @Text "Child 2.2")
           MODIFY  Tree2            Nodes::Add(
                   BY NAME Relative "R2",
                   BY NAME Relationship tvwChild,
                   BY NAME Key "C23",
                   BY NAME @Text "Child 2.3")
           MODIFY  Tree2            Nodes::Add(
                   BY NAME Relative "R2",
                   BY NAME Relationship tvwChild,
                   BY NAME Key "C24",
                   BY NAME @Text "Child 2.4")
           MODIFY  ANode            Expanded = 1
           EXIT    PARAGRAPH
           .

[Migrated content. Thread originally posted on 11 February 2003]

Hello,
I am after a bit of help if possible. I am attempting to incorporate the Microsoft treeview Control (Active-x Control) into my Acucobol-GT application. What I am ultimately aiming at is to have two or three Treeview controls on one screen and be able to drag and drop items between Treeviews.

However, I am struggling at the moment to be able to even populate one treeview let alone multiples.

Has anybody got any experience of usuing this control within Acucobol. I can accomplish it quite easily using Visual Basic, but I do not want to develop in this as all of our applications are developed in Acucobol-GT
Thanks for the example.

[Migrated content. Thread originally posted on 11 February 2003]

Hello,
I am after a bit of help if possible. I am attempting to incorporate the Microsoft treeview Control (Active-x Control) into my Acucobol-GT application. What I am ultimately aiming at is to have two or three Treeview controls on one screen and be able to drag and drop items between Treeviews.

However, I am struggling at the moment to be able to even populate one treeview let alone multiples.

Has anybody got any experience of usuing this control within Acucobol. I can accomplish it quite easily using Visual Basic, but I do not want to develop in this as all of our applications are developed in Acucobol-GT
Thanks for the example.