CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Outline Control

  1. #1
    Join Date
    Mar 2001
    Location
    Israel
    Posts
    116

    Outline Control

    Hi

    I am trying to use the outline control
    and i dont understand it.
    can someone please tell me how to add
    a subitems to an item (the help file doesnt help)


    thanks
    limor


  2. #2
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: Outline Control

    Here is an example I found On Microsoft Development network for the Outline control. I should note that the Outline control is old stuff and has been replaced by the Treeview control. It is only a matter of time before Outline control support will be dropped.

    option Explicit
    Dim FIndent as Integer
    Dim FIndex as Integer
    Dim StrtPath as string

    private Sub Drive1_Change()
    Outline1.Clear
    Outline1.AddItem Drive1.Drive & "\"
    FIndent = 1
    FIndex = 0
    StrtPath = Drive1.Drive
    Get_Files StrtPath
    MsgBox "OK"
    End Sub

    private Sub Get_Files(FPath as string)
    Dim File_Name as string
    Dim File_Path as string
    Dim File_Read as Integer
    Dim X as Boolean
    Dim I as Integer

    FIndent = FIndent + 1
    File_Path = FPath & "\"
    File_Name = Dir$(File_Path, vbDirectory)
    File_Read = 1
    X = false

    Do While File_Name <> ""
    If File_Name <> "." And File_Name <> ".." then
    If GetAttr(File_Path & File_Name) <> vbDirectory then
    Outline1.AddItem File_Name
    FIndex = FIndex + 1
    Outline1.Indent(FIndex) = FIndent
    else
    StrtPath = File_Path & File_Name
    Outline1.AddItem File_Name
    FIndex = FIndex + 1
    Outline1.Indent(FIndex) = FIndent
    X = true
    Get_Files StrtPath
    End If
    End If
    If X = true then
    File_Name = Dir$(File_Path, vbDirectory)
    for I = 2 to File_Read
    File_Name = Dir$
    next
    X = false
    End If
    File_Name = Dir$
    File_Read = File_Read + 1
    Loop
    FIndent = FIndent - 1
    End Sub






    John G

  3. #3
    Join Date
    Mar 2001
    Location
    Israel
    Posts
    116

    Re: Outline Control

    thank you

    limor


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured