Link to home
Start Free TrialLog in
Avatar of Peter Kiers
Peter KiersFlag for Netherlands

asked on

Toolbar icons only visible in designtime not in runtime

Dear Experts,

I have an TImageList component on my form with some icons loaded.
I have hooked up the TImageList to the MainMenu and the Toolbar
And set the icons for every item.
I designtime the icons appears on the buttons but when i run the
application there are no images on the buttons.

What do i do wrong, who can help me.

Pk
Avatar of Geert G
Geert G
Flag of Belgium image

maybe you have some code which unsets this imagelist from the mainmenu or toolbar ?
mainmenu.Images := nil;

or to some other imagelist ?
Did you use an actionlist ?
Avatar of Peter Kiers

ASKER

I did but i have deleded the actionlist component.
Try setting one or two of the images at run time and see if they show up too.
See if it is just a refresh issue.
I did it again, I have set the ImageIndex to 0 (of button NewBtn) for the image.
It shows in Designtime but not in runtime.
really strange, I don't understand!
just my 2 cents:
if you use an actionlist you need to assign the images to that actionlist, and to the toolbar, and to the mainmenu
set all properties for each separate action, and afterwards assign the action to the menu or toolbar button
the action will copy it's settings to the relevant component (menu or button)

then you deleted all the actions ?
Could you help me with this telling me step by step?
Ignore my previous comment, and let me refrase the question:

Is it possible to get icons in the menu-item and on the toolbar-buttons wihout
using a TActionList?

P.
do you want a longer answer than "yes" ?
yes
i gues i posted in the wrong Q ...
ASKER CERTIFIED SOLUTION
Avatar of Geert G
Geert G
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ok thanks.