I've got a toolpanel with several buttons that are tied to WP actions.
The problem is that they are being drawn with the default captions in spite of the actions having UseOwnCaption set to True. I don't want them to have captions at all so I've set all their captions to ''
It looks to me as though the problem is that the actions are all created using TWPAction.CreateStyled, which in turn calls SetStyle, which calls UpdateCaption. Now UpdateCaption has the following code :-
if not FUseOwnCaption then
begin
WPGetActionHintCaption(Fstyle, aCap, aHint);
Caption := aCap;
Hint := aHint;
end;
Unfortunately, at this point FUseOwnCaption is false, since the properties haven't yet been loaded.
I think the correct solution is to implement the Loaded method and call UpdateCaption there.
#1
♥ 0