Solved

Toolbar refusing to accept Imagelist

Posted on 2003-10-28
9
814 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
  • 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
 
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

757 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now