Show hints even if control is disabled

Tagged: 

Viewing 20 posts - 1 through 20 (of 36 total)
  • Author
    Posts
  • #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 6 years, 5 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.

                                          #68341
                                          HeDiBo
                                          Participant

                                            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.

                                            Both have the cursor position in the lParam parameter. But WM_MOUSEHOVER only occurs once at the right time. Maybe I don’t get your point.

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