Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default imagelist filling at designtime

Hi XL-guru's

First I like to express my admiration for your expertise.
I read the posts in this NG for 5 months on a daily basis and I've learned
so much allready.
It's both interesting and educational to see how different approaches solve
one problem.
But now it's my turn to ask for your help.

I need to fill an imagelist with icons that I will use for a treeview in a
userform.
Using Ron de Bruin's Googlesearch I found an exellent example on Chip
Pearson's site.
Great tool that I use many times that Googlesearch.(thanks Ron)

From Chips example I could create my solution as disired, but I am lost on
this one:

the imagelist containing the icons is now filled at runtime.
Because in my application the imagelist contents will not change I want to
fill it once at disigntime.

I found some explanation on different sites, but can't reproduce it.

The dialog that should appear when you choose properties does not appear
when using an imagelist on a userform.
I do get this dialog when the imagelist is added to a worksheet, but I can
not cot/paste that to my userform.

Am I doing something wrong, or is there another explanation?

Kind regards,

Ernst


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default imagelist filling at designtime

I'm not sure if the ImageList control you are talking about is the one I
have available in my system or not. I have VB6 installed on my system (so
I'm not sure if it installed the ImageList control I'm using or not)... the
ImageList control that I get to add to the Toolbox is listed in the
Additional Controls dialog as...

Microsoft ImageList Control 6.0 (SP6)

If that is the one you are using, then when I add it my UserForm, the
Properties window has an entry named Custom which allows you to add images
at design time.

Rick


"Ernst Schuurman" wrote in message
...
Hi XL-guru's

First I like to express my admiration for your expertise.
I read the posts in this NG for 5 months on a daily basis and I've learned
so much allready.
It's both interesting and educational to see how different approaches
solve one problem.
But now it's my turn to ask for your help.

I need to fill an imagelist with icons that I will use for a treeview in a
userform.
Using Ron de Bruin's Googlesearch I found an exellent example on Chip
Pearson's site.
Great tool that I use many times that Googlesearch.(thanks Ron)

From Chips example I could create my solution as disired, but I am lost on
this one:

the imagelist containing the icons is now filled at runtime.
Because in my application the imagelist contents will not change I want to
fill it once at disigntime.

I found some explanation on different sites, but can't reproduce it.

The dialog that should appear when you choose properties does not appear
when using an imagelist on a userform.
I do get this dialog when the imagelist is added to a worksheet, but I can
not cot/paste that to my userform.

Am I doing something wrong, or is there another explanation?

Kind regards,

Ernst


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default imagelist filling at designtime

Ernst,
In the properties window (for the ImageList control) in the VBE,
select "Custom". The Property Pages form for the ImageList pops up.
Insert your pictures on the Images tab.
--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Ernst Schuurman"
wrote in message
Hi XL-guru's

First I like to express my admiration for your expertise.
I read the posts in this NG for 5 months on a daily basis and I've learned
so much allready.
It's both interesting and educational to see how different approaches solve
one problem.
But now it's my turn to ask for your help.

I need to fill an imagelist with icons that I will use for a treeview in a
userform.
Using Ron de Bruin's Googlesearch I found an exellent example on Chip
Pearson's site.
Great tool that I use many times that Googlesearch.(thanks Ron)
From Chips example I could create my solution as disired, but I am lost on
this one:
the imagelist containing the icons is now filled at runtime.
Because in my application the imagelist contents will not change I want to
fill it once at disigntime.
I found some explanation on different sites, but can't reproduce it.
The dialog that should appear when you choose properties does not appear
when using an imagelist on a userform.
I do get this dialog when the imagelist is added to a worksheet, but I can
not cot/paste that to my userform.
Am I doing something wrong, or is there another explanation?
Kind regards,
Ernst


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default imagelist filling at designtime

Hi Rick,

Thank you for your response.
I am using then Microsoft ImageList Control 6.0 (SP6)
I just found that before adding the control to the userform I can get the
dialog by using custom in the right click menu from the userforms toolbar.
but when typing the following line into the immidiate window after stepping
into the first line of the UserForm_Initialize procedure

?ImgLijst.ListImages.Count

I get 0 as result. where ImgLijst is the imagelist's name.

starting the userform results in an errormessage:

ImageList must be initialised before it can be used.

So that gives me the impression that there are not realy pictures added.

I am sure I've added 5 pictures to the ImageList before I added it to the
userform.

And when it is added to the form I see no custom option anymore.

So I must do something wrong, but I am not sure what.


"Rick Rothstein (MVP - VB)" schreef in
bericht ...
I'm not sure if the ImageList control you are talking about is the one I
have available in my system or not. I have VB6 installed on my system (so
I'm not sure if it installed the ImageList control I'm using or not)...
the ImageList control that I get to add to the Toolbox is listed in the
Additional Controls dialog as...

Microsoft ImageList Control 6.0 (SP6)

If that is the one you are using, then when I add it my UserForm, the
Properties window has an entry named Custom which allows you to add images
at design time.

Rick


"Ernst Schuurman" wrote in message
...
Hi XL-guru's

First I like to express my admiration for your expertise.
I read the posts in this NG for 5 months on a daily basis and I've
learned so much allready.
It's both interesting and educational to see how different approaches
solve one problem.
But now it's my turn to ask for your help.

I need to fill an imagelist with icons that I will use for a treeview in
a userform.
Using Ron de Bruin's Googlesearch I found an exellent example on Chip
Pearson's site.
Great tool that I use many times that Googlesearch.(thanks Ron)

From Chips example I could create my solution as disired, but I am lost
on this one:

the imagelist containing the icons is now filled at runtime.
Because in my application the imagelist contents will not change I want
to fill it once at disigntime.

I found some explanation on different sites, but can't reproduce it.

The dialog that should appear when you choose properties does not appear
when using an imagelist on a userform.
I do get this dialog when the imagelist is added to a worksheet, but I
can not cot/paste that to my userform.

Am I doing something wrong, or is there another explanation?

Kind regards,

Ernst




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default imagelist filling at designtime

As a test, after going to the Image tab on the Custom dialog for the
ImageList control and Inserting two BMP pictures, I added...

Private Sub UserForm_Initialize()
Debug.Print ImageList1.ListImages.Count
End Sub

to the UserForm's code window and ran the program... it printed 2 to the
Immediate window.

Rick


"Ernst Schuurman" wrote in message
...
Hi Rick,

Thank you for your response.
I am using then Microsoft ImageList Control 6.0 (SP6)
I just found that before adding the control to the userform I can get the
dialog by using custom in the right click menu from the userforms toolbar.
but when typing the following line into the immidiate window after
stepping into the first line of the UserForm_Initialize procedure

?ImgLijst.ListImages.Count

I get 0 as result. where ImgLijst is the imagelist's name.

starting the userform results in an errormessage:

ImageList must be initialised before it can be used.

So that gives me the impression that there are not realy pictures added.

I am sure I've added 5 pictures to the ImageList before I added it to the
userform.

And when it is added to the form I see no custom option anymore.

So I must do something wrong, but I am not sure what.


"Rick Rothstein (MVP - VB)" schreef
in bericht ...
I'm not sure if the ImageList control you are talking about is the one I
have available in my system or not. I have VB6 installed on my system (so
I'm not sure if it installed the ImageList control I'm using or not)...
the ImageList control that I get to add to the Toolbox is listed in the
Additional Controls dialog as...

Microsoft ImageList Control 6.0 (SP6)

If that is the one you are using, then when I add it my UserForm, the
Properties window has an entry named Custom which allows you to add
images at design time.

Rick


"Ernst Schuurman" wrote in message
...
Hi XL-guru's

First I like to express my admiration for your expertise.
I read the posts in this NG for 5 months on a daily basis and I've
learned so much allready.
It's both interesting and educational to see how different approaches
solve one problem.
But now it's my turn to ask for your help.

I need to fill an imagelist with icons that I will use for a treeview in
a userform.
Using Ron de Bruin's Googlesearch I found an exellent example on Chip
Pearson's site.
Great tool that I use many times that Googlesearch.(thanks Ron)

From Chips example I could create my solution as disired, but I am lost
on this one:

the imagelist containing the icons is now filled at runtime.
Because in my application the imagelist contents will not change I want
to fill it once at disigntime.

I found some explanation on different sites, but can't reproduce it.

The dialog that should appear when you choose properties does not appear
when using an imagelist on a userform.
I do get this dialog when the imagelist is added to a worksheet, but I
can not cot/paste that to my userform.

Am I doing something wrong, or is there another explanation?

Kind regards,

Ernst





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
filling information from one cell and filling another. Dianne Excel Worksheet Functions 1 August 15th 05 08:14 PM
when setting Imagelist for ImageCombot, Excel crash Arnaud Excel Programming 1 July 1st 05 07:50 PM
ImageList must be initialized What-a-Tool Excel Programming 6 October 27th 04 12:39 AM
Treeview/imagelist problem ravi_cpt Excel Programming 0 July 9th 04 07:40 AM
How to use Treeview control with Imagelist kvenku[_2_] Excel Programming 0 April 7th 04 01:52 PM


All times are GMT +1. The time now is 06:31 AM.

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"