RealDocs

UBorder::OnMouseButtonDownEvent

property UMG Blueprint Since 4.0
#include "Components/Border.h"
Access: public Specifiers: UPROPERTYEditAnywhere

Description

Bindable event fired when a mouse button is pressed while the pointer is over the border, letting a bound handler consume the input and control the resulting FEventReply.

Caveats & Gotchas

  • Bound via the 'Events' section in the Details panel or a Blueprint graph like a normal delegate; it only fires while the border's native HandleMouseButtonDown is reached during hit-testing.
  • The bound handler must return an FEventReply — return the reply as Handled() to stop the event bubbling further up the widget tree, or Unhandled() to let it propagate.

Signature

FOnPointerEvent OnMouseButtonDownEvent

Example

Handle mouse-down on a border C++
FEventReply UMyUserWidget::HandleBorderMouseDown(FGeometry MyGeometry, const FPointerEvent& MouseEvent)
{
    // React to the press here
    return UWidgetBlueprintLibrary::Handled();
}

void UMyUserWidget::NativeConstruct()
{
    Super::NativeConstruct();
    if (MyBorder)
    {
        MyBorder->OnMouseButtonDownEvent.BindDynamic(this, &UMyUserWidget::HandleBorderMouseDown);
    }
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.