Creating rvAction at runtime - set property ImageIndex

General TRichView support forum. Please post your questions here
Post Reply
Juergen
Posts: 9
Joined: Thu Nov 05, 2009 8:47 pm
Location: Germany

Creating rvAction at runtime - set property ImageIndex

Post by Juergen »

Hello,

I want to create TrvActions at runtime. I create an Action with

Code: Select all

FrvActionCut1 := TrvActionCut.Create(FActionList);
To set Caption and Hint property I call

Code: Select all

RVA_LocalizeForm(FActionList);
How can I load the Images in a TImageList and how to set the ImageIndex property of the Action?

Thanks in advance.

Juergen
Sergey Tkachenko
Site Admin
Posts: 17566
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Sorry, I missed this question.
May be it makes sense to add all necessary pictures in image list at designtime?
Juergen
Posts: 9
Joined: Thu Nov 05, 2009 8:47 pm
Location: Germany

Post by Juergen »

That's the way I solved my Problem.

I have created a new Component (a TDBRTFEditor). Now this Component have a property mageList. The main problem was that I have to set the ItemIndex value by myself.

When creating the Action at Designtime from Standard Actions this data and all other properties are copied from a existing Version of the (Standard) Action (it was hard to figure out how this works while the documentation is poor about Standard Actions).

Unfortunately I can't use Standard Action in my Component. I received some errors when the Component is created (design time as well as run time). I stopped this way and using the property ImageList in my Component.
Post Reply