Solved

Toolbar refusing to accept Imagelist

Posted on 2003-10-28
9
837 Views
Last Modified: 2013-12-25
VB6 Pro

I draw the toolbar, then go to add the imagelist in its properties.  I select the existing imagelist from the dropdown menu, click Apply.  The imagelist name changes back to <None>.

I tried assigning the imagelist at runtime: toolbar1.imagelist=imagelist1
the button size changes to reflect the image size, but no images.

This happens even in the wizard-created empty MDI app: if I deselect the imagelist from the toolbar, click apply, then try to select the imagelist again -- it does not work.

???
0
Comment
Question by:tart666
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
9 Comments
 
LVL 14

Accepted Solution

by:
Tommy Kinard earned 125 total points
ID: 9636654
This may be silly but have you entered the number of the image in the imagelist1 for that button?

dragontooth



0
 

Author Comment

by:tart666
ID: 9636673
In the toolbar properties, on the button tab, the image field remains grayed out.  Cannot get that to enable.
0
 

Author Comment

by:tart666
ID: 9636713
OK, some progress, thx dragontooth.  Specifying the image number at runtime seems to help:

Toolbar1.ImageList = ImageList1
Toolbar1.Buttons.Item(1).Image = 1
Toolbar1.Buttons.Item(2).Image = 2
Toolbar1.Buttons.Item(3).Image = 3

Any way to do all this at design time?  Each time I add the ImageList to the Toolbar properties window, it gets rejected and changed back to <None>...
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 14

Expert Comment

by:Tommy Kinard
ID: 9636767
Yes there is let me look at it and I will return with (what I hope) step by step instructions.

dragontooth

0
 
LVL 14

Expert Comment

by:Tommy Kinard
ID: 9636790
http:Q_20723249.html

The above link should help some but I will continue looking.

dragontooth

btw I have done this before it has just been a while so I have to refresh my old brain :-)
0
 

Author Comment

by:tart666
ID: 9636882
>>Place an ImageList on the form. In the properties at the top pick custom.On the dialog box that appears at the top you will see Images pick the tab. At the bottom there is a button Insert Picture pick that. Insert the icons you already have (I hope). when through pick OK. You have the icons in the control.
On the toolbar right click and pick properties, Under the general tab there will be the imagelist box pick the drop down menu and select the ImageList1 (this is the default name).
Now pick the Buttons tab at the top. go through the buttons assigning the icon you wish.

Yep, that's what I do... still the toolbar does not accept the imagelist at design time...
0
 
LVL 14

Expert Comment

by:Tommy Kinard
ID: 9637401
tart666 Thanks for the points and the grade!

Did that work I have the feeling that it didn't. I am having no problems assigning the icons at design time I may be missing something here. I am still willing to help you get this fixed.

dragontooth


0
 

Expert Comment

by:mshieh
ID: 9637913
Is the imagelist populated at design time or run time?
0
 

Author Comment

by:tart666
ID: 9639438
imagelist is created and populated at design time.  No changes at runtime.

I mentioned before, even in the canned wizard-created MDI app, after I disassociate the imagelist from the toolbar, I cannot get it to hook back up....

I will stop trying, and use the workaround...  thx guys
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question