We need you!

We're working hard on the next version of Developer Fusion. Let us know what you think we should be up to!

Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

Rated
Read 9,598 times

Related Categories

Add all fonts to a treeview control

This example will show you how to add all your system fonts to the treeview control.
'//Add a treeview control to your form
'//Paste this in your form 
Private sub form_load()
 Dim i As Integer
With TreeView1.Nodes

    Set Root = .Add(, , , "Available System Fonts")
    For i = 1 To Screen.FontCount - 1
       .Add Root.Index, tvwChild, , Screen.Fonts(i)
    Next
End With
end sub
In the above code, notice the "set Root". This line is the name of the Title or the Category, and anything below it is considered its "subtitles". For example: Title []- Subtitle []-Subtitle Tile 2 []-Subtitle []-Subtitle

age:14, programmer;languages(vb, c++,vbscript, html)

Comments

  • Posted by James Crowley on 20 Jun 2003

    That has been corrected now, thanks for pointing it out!

  • Why the extra ".Add" line?

    Posted by wander on 20 Jun 2003

    I was just wondering why use the extra ".Add" line before the FOR loop, and not just start the loop at 0...

    Regards