Tagged: Hints
- This topic has 36 replies, 4 voices, and was last updated 4 years, 3 months ago by HeDiBo.
-
AuthorPosts
-
October 24, 2018 at 2:13 pm #37997HeDiBoParticipant
As things are now, whether hints are shown and what text they show is inconsistent.
Look at this example project:
[attachment=8972:acBitBtnHints.zip]
The main panel shows a hint.
The TsEdit control shows no hint.
The TsBitBtn control shows the main panel's hint.
The TsSpeedButton control still shows its own hint (even though it's disabled).
The consistency that I would like the most is: always show the control's hint, even if it is disabled ❗.
I say that, because it's the only way to tell the user why the control is disabled!
It would be fine, if this were a setting in the TsAlphaHints controller. It could also be an Option in the TsSkinManager.
I know that officially hints cannot be shown for disabled controls, because mouse events are disabled there. But the form's MouseMove-event could be used in stead. So maybe it needs to be an option in the TsSkinProvider and maybe also in the TsFrameAdapter controls.
November 20, 2018 at 10:49 am #44600HeDiBoParticipantCould you have a look at it, please ❓
December 3, 2018 at 3:01 pm #58676SupportKeymasterI have looked it in the VCL and haven't idea how it may be implemented.
Disabled control doesn't catch any mouse events and WM_NCHITTEST message even.
December 3, 2018 at 7:10 pm #58697HeDiBoParticipant'Support' wrote:I have looked it in the VCL and haven't idea how it may be implemented.
Disabled control doesn't catch any mouse events and WM_NCHITTEST message even.
It's a well known problem.
The solution suggested on the internet is to use the message pump of the containing form to simulate the hint addressed to the disabled control.
March 1, 2019 at 1:56 pm #59174HeDiBoParticipant'HeDiBo' wrote:It's a well known problem.
The solution suggested on the internet is to use the message pump of the containing form to simulate the hint addressed to the disabled control.
The solution could be testing in TsSkinProvider.NewWndProc for the WM_MOUSEHOVER message for the control that is parent to the disabled control. Then if the disabled control has an active hint, show it.
August 16, 2019 at 2:17 pm #59818HeDiBoParticipantHi Serge,
Do you have any thoughts about the suggested implementation for hints on disabled controls? 💐
August 18, 2019 at 6:37 am #59840SupportKeymasterHi
I have some ideas, but time is required for implementing this feature.
October 1, 2019 at 2:49 pm #61321HeDiBoParticipantCould you have another look at it?
October 2, 2019 at 7:40 am #61395sergunalphaKeymasterSorry, it’s not implemented still.
October 2, 2019 at 4:13 pm #61458Stephane SenecalParticipantIf you need hints on disabled control only in few places, you can place that control on a small panel and set the hint on that panel.
If you need this globally, it will be one hell of a job.
Hope it helps.
Stephane Senecal
CIS Group
Delphi programmer since 2001October 6, 2019 at 12:12 pm #61759HeDiBoParticipantIf you need this globally, it will be one hell of a job.
I think it may be surprisingly easy:
The solution could be testing in TsSkinProvider.NewWndProc for the WM_MOUSEHOVER message for the control that is parent to the disabled control. Then if the disabled control has an active hint, show it.
- This reply was modified 5 years, 1 month ago by HeDiBo.
December 3, 2019 at 2:20 pm #68200HeDiBoParticipantAny progress on this?
December 8, 2019 at 11:35 pm #68211SupportKeymasterI was trying to implement it in the CommonWndProc procedure (sCommonData.pas unit), but some additional problems raised, researching of this issue is paused.
December 9, 2019 at 7:28 pm #68223HeDiBoParticipantI saw you intercept WM_MOUSEMOVE. But I think you should intercept WM_MOUSEHOVER. I’m not sure about this. Docs say you have to start with TrackMouseEvent and after that catch thew WM_MOUSEHOVER event.
January 25, 2020 at 3:12 pm #68277HeDiBoParticipantNo progress in 15.00?
January 26, 2020 at 8:47 am #68289SupportKeymasterSorry, not ready yet.
I saw some solutions for this issue in the Net. You saw a solution with an empty label with hint?January 26, 2020 at 1:45 pm #68294HeDiBoParticipantI saw that, but that would overcomplicate things.
Don’t you think catching the WM_MOUSEHOVER message for the control that is parent to the disabled control would be the way to go?January 27, 2020 at 9:43 am #68309SupportKeymasterWe can catch events when mouse hovering and leaving a parent control.
But how it can help ti find out when mouse hovering on a disabled child control?January 27, 2020 at 7:20 pm #68327HeDiBoParticipantCheck whether the control that is child to the parent is disabled. Then take over its hint handling if the parent itself has no hint handling.
January 27, 2020 at 11:36 pm #68333SupportKeymasterThe WM_MOUSEMOVE message is more handy for that. We should check position of the mouse after each moving.
WM_MOUSEHOVER can’t do that. -
AuthorPosts
- The topic ‘Show hints even if control is disabled’ is closed to new replies.