OnMouseEnter event maybe becoming confused?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #35558
    DarrenB
    Participant

    Hi,

    I wonder if you can confirm this/deny for me.

    Basic single form app, all appropriate items applied (SkinManager,SkinProvider). Set skin to Aluminium as that most closely resembles my own app in it's initial state. My proper app uses nested panels as 'display containers'.

    Place a single TsPanel on the form. In it's OnMouseEnter event, place

    Form1.caption := 'Panel';

    Upon the panel, place any number of AlphaSkins buttons…it doesn't matter which kind or how many. Mix them up if you want, it appears not to matter. Link them all to a common OnMouseEvent (if you want, purely for speed…my proper app uses both implementations, seperate and combined OnMouseEvents for appropriate buttons) and in that place

    Form1.caption := 'Button';

    Run program.

    Move mouse…you can see the Panel event is executed when Mouse enters the Panel. But…and this is the thing that is weird…when I move the mouse over any button…the form caption 'flickers' for a few milliseconds…changing from 'Button' back to 'Panel'! Sometimes when I move the mouse between button and panel it looks like form caption isn't changing at all. It appears as if the Panel's OnMouseEnter event is being called when it shouldn't ie after the buttons' own OnMouseEnter event has been called? My current proper app needs to execute differently dependent on whether the mouse is in a button, or a panel and at the moment I can't do it.

    Please note that it appears this behaviour only applies to AlphaSkins buttons on a panel…not for example AlphaSkins TsEdit, TsMemo or other AlphaControls similarly placed upon a panel execute their OnMouseEnter events properly…try the above behaviour with a TsEdit, for example, and the form caption correctly changes.

    Is this reproduceable? AC 8.14 latest skins. Vista 64Bit, Delphi XE.

    Thanks

    Darren

    #49798
    Hamilton
    Participant

    Hi Darren,

    I can repro the problem using the attached demo. If you mouse over the TsButtons on the TsPanel on the upper part of the form then the mouse move event is not being consumed properly by the button and is being passed through to the panel beneath it and that panels' OnMove event is firing too. For the TPanel and TButtons in the lower part of the form the events fire as you would expect.

    Regards,

    Hamilton

    #49800
    DarrenB
    Participant

    Hi Hamilton,

    got your demo. Thanks, confirmed behaviour here too. Never checked for the panel OnMove event being fired…nice add 😉

    Darren

    #49824
    Support
    Keymaster

    Hi and thanks for the demo.

    I see a problem and I'll try to fix it ASAP 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.