Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default TreeView Image List

Hi.

I'm basically new to TreeView, though I have tried it before, a long time ago.

I found a short example about adding nodes, referencing them to parents,
etc...

I see that you can add images to the nodes, but in order to do it, you need
to first have an imagelist associated with the treeview.

Which in turn means that you have to instantiated an image list, and
populated it with images.

There's the question... how do I work with an image list and images... I
couldn't seem to find it in the available controls, though they are both
there for dimensioning in the code.

Thanks for any help with this.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default TreeView Image List

Roedd <<mark wedi ysgrifennu:


There's the question... how do I work with an image list and
images... I couldn't seem to find it in the available controls,
though they are both there for dimensioning in the code.


Right-click on your controls toolbox to add a new control. From the list,
pick Microsoft ImageList (might be version 5 or 6 depending on which version
of VB you have installed). You can then add this control to your form.
Select the control once it is on your form's surface and set its properties
(including adding images) via the (Custom)[...] section of the properties
window.

Once you have added some images, you will find that you can't bind your
treeview to your imagelist at design time. I suspect that this is because
the two controls were not designed to be used with MSForms (and/or vice
versa). So, you'll have to bind at run time -

Private Sub UserForm_Initialize()
Set Me.TreeView1.ImageList = Me.ImageList1
Me.TreeView1.Nodes.Add , , , "My Node", 1, 2
Me.TreeView1.Nodes.Add , , , "My Other Node", 1, 2
'etc...
End Sub

You should be aware that to use this control in Office (except for Access)
you will need a design time licence for every machine it runs on. In other
words, you are not allowed to distribute Excel apps built with the treeview
and/or the imageview control.

--
Rob

http://www.asta51.dsl.pipex.com/webcam/

This message is copyright Robert Bruce and intended
for distribution only via NNTP.
Dissemination via third party Web forums with the
exception of Google Groups and Microsoft Communities
is strictly prohibited and may result in legal action.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default TreeView Image List

You should be aware that to use this control in Office (except for Access)
you will need a design time licence for every machine it runs on. In other
words, you are not allowed to distribute Excel apps built with the treeview
and/or the imageview control.




Thanks for telling me about that.

I use two machines here at work... one has Visual Basic 6, and the other
does not. The one that does not have VB6 does have MS Access 2000. Is that
why the treeview and imagelist controls are available on the machine without
VB?

Question... how would one be supposed to know that distributing Excel apps
with the treeview and imagelist is inappropriate, when it is available and
works from Excel, without any warnings about illegality? I didn't know.
(and haven't done it yet).

Mark



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hyperlink to an image in other worksheet, displaying entire image. twilliams Excel Worksheet Functions 0 February 7th 06 10:02 PM
Displaying a Tif image in the Image Control Neil Excel Programming 1 September 21st 04 12:56 AM
copy shape image into image control Luc Benninger Excel Programming 2 July 15th 04 11:14 AM
Export the worksheet background image as an image file - possible? DataFreakFromUtah Excel Programming 2 April 10th 04 04:49 PM
Open image from web in window same size as image? Milos Setek Excel Programming 0 February 5th 04 03:33 AM


All times are GMT +1. The time now is 06:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"