XSharpPublic icon indicating copy to clipboard operation
XSharpPublic copied to clipboard

TypedSDK: PushButton:MouseButtonDown() callback is never called

Open SUngemach opened this issue 11 months ago • 1 comments

Describe the bug The mentioned callback does never happen

To Reproduce

  1. Instantiate a pushbutton with the TABSTOP style and put it on a dialog
  2. Write a MouseButtonDown(oMev) method and put some debug code in it
  3. Move the mouse over it (the appearance changes a bit as expected) or give it focus by TAB key
  4. Click the mouse (left button)
  5. Debug console shows nothing, but it should

Additional context There are of course workarounds (Dispatch() method, maybe other callbacks, even ButtonClick() on the owner dialog), but that's not the point.

SUngemach avatar Jan 31 '25 10:01 SUngemach

I tried to reproduce this with the Pizza example, ported from VO. When I add

MouseButtonDown(oMev as MouseEvent) AS VOID
SUPER:MouseDown(oMev)
RETURN

to the class TwoBmpButton, then this method gets called when I press the mouse on the button with the bitmaps. This button has the TabStop style set

	CONTROL "", ORDERDIALOG_ORDERBUTTON, "BUTTON", WS_CHILD|WS_TABSTOP|BS_DEFPUSHBUTTON|BS_BITMAP, 15, 225, 43, 40

RobertvanderHulst avatar Feb 04 '25 12:02 RobertvanderHulst