IceCold
IceCold

Reputation: 21221

How to show an icon in a TButton?

My main form has a TActionList component connected to TImageList. The problem is that the TImageList was moved recently in a DataModule. Now when I assign an action to a TButton, the image associated to that action does not appear in the button.

How to fix this, while keeping the image list in the data module?

Upvotes: 1

Views: 1558

Answers (2)

Andreas Rejbrand
Andreas Rejbrand

Reputation: 109068

It works for me.

Of course, the DM's unit must be included in the form's unit (in a uses list), and the TButton's Images property must be (re)set to the image list.

Upvotes: 1

Osama Ghazal
Osama Ghazal

Reputation: 21

You Should assign the Images Property in TButton To the same ImageList.

Upvotes: 2

Related Questions