Page 1 of 1
RVAction Hints
Posted: Thu Jan 25, 2018 11:00 pm
by clarktechinc
Due to space constraints, I am unable to include a statusbar on my form with a RichviewEdit. As a consequence, none of the hints for my toolbar buttons with assigned rvActions are shown. Hints for my other toolbar buttons without Actions assigned do appear as expected. How can I cause the buttons with assigned rvActions to appear with "normal" hints?
Re: RVAction Hints
Posted: Fri Jan 26, 2018 6:29 am
by Sergey Tkachenko
All our RichViewActions use standard hints, the same hints as other components.
To show tooltip windows, make sure that ShowHint properties of all toolbar buttons = True.
(you can set Form.ShowHint = True; by default, ParentShowHint = True for all controls, and they use ShowHint property of the parent form).
A full hint consists of two parts, a short hint and a long hint.
For example, if Hint = 'New|Creates a new document':
- the short hint is 'New', it is displayed in tooltips.
- the long hint is 'Creates a new document'.
A short hint is shown on a tooltip, without additional code, if ShowHint of the button = True.
Showing a long hint requires additional code, it is usually shown in a status bar. But there are alternative solutions. For example, look how Edge browser shows URLs when you move the mouse pointer to a hyperlink. It displays a small label at the bottom left corner of the browser. It is visible only when it has something to show. You can display long hints in the same way, using Application.OnHint event.
Re: RVAction Hints
Posted: Fri Jan 26, 2018 4:18 pm
by clarktechinc
When examining the ActionList supplied in the source datamodules (dmActions, dmActionsAlpha) the only rvAction that includes a hint is rvActionColor. All other rvActions do not include any hint properties. As expected, rvActionColor displays the hint. Obviously the others will not show a hint as their hint property is blank. Is there another source of rvactions that include the hints?
The RVActions demos that use a statusbar do indeed show the full rvActions hints so there must be some difference when using a StatusBar and when not. I'm missing something.
Attached is a simple project that demonstrates the issue.
Re: RVAction Hints
Posted: Sat Jan 27, 2018 7:33 am
by Sergey Tkachenko
Initially, all actions from RichViewActions have temporal Caption and Hint.
To assign the proper captions and hints, call
RVA_LocalizeForm(<form or datamodule, containing the actions>);
In your example, call
Code: Select all
RVA_LocalizeForm(rvActionsResource)
in FormCreate or FormShow.
Re: RVAction Hints
Posted: Sat Jan 27, 2018 3:45 pm
by clarktechinc
That's it! Once I put "RVA_LocalizeForm(myDataModule);" into the DataModule OnCreate event the rvAction button hints now appear as expected. I had applied the LocalizeForm(myForm) into the myForm's OnCreate event but that did not expose the button hints. Thanks for the clarification.
Re: RVAction Hints
Posted: Sun Jan 28, 2018 2:26 pm
by Shankles
Hi Sergey, is it possible to completely turn off the Hints? Or is that not a good idea?
Re: RVAction Hints
Posted: Mon Jan 29, 2018 7:28 pm
by Sergey Tkachenko
You can assign ShowHint property = False for your form. Since, normally, all controls inherit value of this property from its parent control (their ParentShowHint = True), this assignment turns offs displaying popup hints.