Page 1 of 1
Creating rvAction at runtime - set property ImageIndex
Posted: Thu Nov 05, 2009 8:55 pm
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
How can I load the Images in a TImageList and how to set the ImageIndex property of the Action?
Thanks in advance.
Juergen
Posted: Mon Nov 23, 2009 7:49 pm
by Sergey Tkachenko
Sorry, I missed this question.
May be it makes sense to add all necessary pictures in image list at designtime?
Posted: Wed Nov 25, 2009 2:50 pm
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.