RVAction Hints
-
- Posts: 5
- Joined: Thu Jan 25, 2018 9:19 pm
- Location: Calgary, AB, Canada
- Contact:
RVAction Hints
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?
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: RVAction Hints
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.
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.
-
- Posts: 5
- Joined: Thu Jan 25, 2018 9:19 pm
- Location: Calgary, AB, Canada
- Contact:
Re: RVAction Hints
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.
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.
- Attachments
-
- ActionsHintsTest.zip
- (22.11 KiB) Downloaded 1246 times
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: RVAction Hints
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
in FormCreate or FormShow.
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)
-
- Posts: 5
- Joined: Thu Jan 25, 2018 9:19 pm
- Location: Calgary, AB, Canada
- Contact:
Re: RVAction Hints
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
Hi Sergey, is it possible to completely turn off the Hints? Or is that not a good idea?
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: RVAction Hints
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.