Show hints even if control is disabled

Tagged: 

Viewing 20 posts - 1 through 20 (of 37 total)
  • Author
    Posts
  • #37997
    HeDiBo
    Participant

    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.

    #44600
    HeDiBo
    Participant

    Could you have a look at it, please

    #58676
    Support
    Keymaster

    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.

    #58697
    HeDiBo
    Participant
    '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.

    #59174
    HeDiBo
    Participant
    '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.

    #59818
    HeDiBo
    Participant

    Hi Serge,

    Do you have any thoughts about the suggested implementation for hints on disabled controls? 💐

    #59840
    Support
    Keymaster

    Hi

    I have some ideas, but time is required for implementing this feature.

    #61321
    HeDiBo
    Participant

    Could you have another look at it?

    #61395
    sergunalpha
    Keymaster

    Sorry, it’s not implemented still.

    #61458
    Stephane Senecal
    Participant

    If 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 2001

    #61759
    HeDiBo
    Participant

    If 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 4 years, 11 months ago by HeDiBo.
    #68200
    HeDiBo
    Participant

    Any progress on this?

    #68211
    Support
    Keymaster

    I was trying to implement it in the CommonWndProc procedure (sCommonData.pas unit), but some additional problems raised, researching of this issue is paused.

    #68223
    HeDiBo
    Participant

    I 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.

    #68277
    HeDiBo
    Participant

    No progress in 15.00?

    #68289
    Support
    Keymaster

    Sorry, not ready yet.
    I saw some solutions for this issue in the Net. You saw a solution with an empty label with hint?

    #68294
    HeDiBo
    Participant

    I 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?

    #68309
    Support
    Keymaster

    We 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?

    #68327
    HeDiBo
    Participant

    Check 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.

    #68333
    Support
    Keymaster

    The WM_MOUSEMOVE message is more handy for that. We should check position of the mouse after each moving.
    WM_MOUSEHOVER can’t do that.

Viewing 20 posts - 1 through 20 (of 37 total)
  • The topic ‘Show hints even if control is disabled’ is closed to new replies.