Usage of TrvActionsResource in the current TRichView version
Posted: Mon Sep 23, 2019 2:40 pm
So far I've been adding the unit "dmActionsAlpha" to the uses clause in some units of my project and then using "MyrvActionsResource: TrvActionsResource" to access the image lists or actions from this DataMadoule like "MyToolBar.Images := MyrvActionsResource.ilNormal" or "MyRVActionUndo := MyrvActionsResource.rvActionUndo1" etc. in my own DataModule for TRichView related stuff. The toolbar consists some additional buttons / controls beyond the RVActions and is being created at runtime, which was the main reason for this approach, I believe, and as far as I remember, I did it based on the advice from this forum.
In the current TRichView version the unit "dmActionsAlpha" seems not to exist anymore. "TrvActionsResource" is declared in "dmActions", while there are no "ilNormal" and "ilDisabled" image lists there. Those do exist in "dmActionsImages1.pas" or "dmActionsImages2.pas".
Has the whole approach for such a use case changed? I couldn't find anything in the documentation etc.
Should I just add dmActions and dmActionsImages1 to uses clause and then change my code to
rvActionsImages1 := TrvActionsImages1.Create(nil);
MyToolBar.Images := rvActionsImages1.ilNormal;
MyToolBar.DisabledImages := rvActionsImages1.ilDisabled;
while keeping
MyrvActionsResource := TrvActionsResource.Create(nil);
MyRVActionUndo := MyrvActionsResource.rvActionUndo1;
etc. or am I missing something basic?
In the current TRichView version the unit "dmActionsAlpha" seems not to exist anymore. "TrvActionsResource" is declared in "dmActions", while there are no "ilNormal" and "ilDisabled" image lists there. Those do exist in "dmActionsImages1.pas" or "dmActionsImages2.pas".
Has the whole approach for such a use case changed? I couldn't find anything in the documentation etc.
Should I just add dmActions and dmActionsImages1 to uses clause and then change my code to
rvActionsImages1 := TrvActionsImages1.Create(nil);
MyToolBar.Images := rvActionsImages1.ilNormal;
MyToolBar.DisabledImages := rvActionsImages1.ilDisabled;
while keeping
MyrvActionsResource := TrvActionsResource.Create(nil);
MyRVActionUndo := MyrvActionsResource.rvActionUndo1;
etc. or am I missing something basic?