Forum > Designer

how to show hints NOT also at child elements

<< < (2/4) > >>

Muso:

--- Quote from: GetMem on July 22, 2021, 06:47:13 am ---Set property ShowHint for the RadioGroup to True,  then:
...
If you have multiple RadioGroups, the above method will silence them all, but then you can play with the Tag property to enable/disable hint for a particular RadioGroup.

--- End quote ---

Thanks. Unfortunately it doesn't work for me, see my attached demo program with your solution.

Nevertheless, I have in total 58 (sic!) radio groups in my program. It would be a nightmare to handle them differently that some show a hint, some not.

In general, I need a solution in which the child of a groupbox does not show any hint, nevertheless if the groupbox itself shows a hint or not.
It seems this is not possible.
The question is now, could this be implemented to the LCL for future or not. If yes, I would like to open an enhancement issue in the bugtracker.

GetMem:

--- Quote ---Thanks. Unfortunately it doesn't work for me, see my attached demo program with your solution.
--- End quote ---
You're welcome! It works if you set Pump1DirectionRG1's ShowHint property to true, as I mentioned in my previous post.


--- Quote ---Nevertheless, I have in total 58 (sic!) radio groups in my program. It would be a nightmare to handle them differently that some show a hint, some not.
--- End quote ---
You don't have to handle it differently for all 58 radio group. If you don't want to show hint for a particular radiogroup, just set Tag to 1 and add that condition to:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---CanShow := not ((HintInfo.HintControl is TRadioButton) or (HintInfo.HintControl is TRadioGroup));


--- Quote ---In general, I need a solution in which the child of a groupbox does not show any hint, nevertheless if the groupbox itself shows a hint or not.
It seems this is not possible. The question is now, could this be implemented to the LCL for future or not. If yes, I would like to open an enhancement issue in the bugtracker.
--- End quote ---
You could file a bugreport, but if delphi behaves in a similar way, I don't think it will be changed(maybe I'm wrong here).

wp:
I think you could define a "wild-card hint" meaning "don't show this hint". Suppose all components for which you do not want to see a hint, no matter of the child-parent-relationship, have the Hint text '*'. Then the Application.OnHint could check for this text and turn off the hint if it matches. Since Application.OnHint is application-wide, all your hints are handled with that same handler.

Muso:

--- Quote from: GetMem on July 22, 2021, 02:34:34 pm ---You're welcome! It works if you set Pump1DirectionRG1's ShowHint property to true, as I mentioned in my previous post.

--- End quote ---

Opps, sorry for my mistake.


--- Quote ---You don't have to handle it differently for all 58 radio group. If you don't want to show hint for a particular radiogroup, just set Tag to 1 and add that condition to:

--- End quote ---

OK, got it.


--- Quote ---
--- Quote ---In general, I need a solution in which the child of a groupbox does not show any hint, nevertheless if the groupbox itself shows a hint or not.
It seems this is not possible. The question is now, could this be implemented to the LCL for future or not. If yes, I would like to open an enhancement issue in the bugtracker.
--- End quote ---
You could file a bugreport, but if delphi behaves in a similar way, I don't think it will be changed(maybe I'm wrong here).

--- End quote ---

I don't know how Delphi behaves. Can one have there a hing for the GroupBox but no hint for a child of this GroupBox?

GetMem:
@Muso

--- Quote ---I don't know how Delphi behaves. Can one have there a hing for the GroupBox but no hint for a child of this GroupBox?

--- End quote ---
See Bart's comment above. :)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version