[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Toolbar refusing to accept Imagelist

Posted on 2003-10-28
9
Medium Priority
?
862 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 500 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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

656 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