Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using ImageList Control and adding pictures in Office XP 1

Status
Not open for further replies.

eagleclaw

Programmer
Sep 20, 2002
19
US
Need to find out how to add pictures to the image list control and then assign them to nodes (branches/leaves?) in a Treeview Control. This is for a user form in word. All of the documentation that I can find says to add an image to an image list through the image tab. When using the vb editor in word I do not get any tabs, nor is there any property that I can find to add an image. Then I need to add the image/icon to the nodes in my treeview control???
Thanks
 
When you use userform with imagelist - select the control and next (custom) in properties. There is "insert picture" button on "images" tab on the dialog.
To get first picture from the list:
[tt]ImageList1.ListImages.Item(1).Picture[/tt]

To assign pictures (four pictures in Imagelist1):
[tt]With TreeView1
.Style = tvwTreelinesPlusMinusPictureText
.ImageList = ImageList1
.Nodes.Add , , "Root", "Node1", 1, 2
.Nodes.Add "Root", 1, , "Child1", 3, 4
End With[/tt]

The ImageList and TreeView are not standard controls in office.

combo

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top