Navigation
API > API/Developer > API/Developer/ToolMenus > API/Developer/ToolMenus/UToolMenuWidgetCollectionContext
Description
Find a previously added widget. Uses the widget's type via WidgetType::StaticWidgetClass.
This requires that the widget implements SLATE_DECLARE_WIDGET in its class definition.
This function performs an exact match on the widget type - there is no inheritance checking.
| Name | FindWidget |
| Type | function |
| Header File | /Engine/Source/Developer/ToolMenus/Public/ToolMenuWidgetCollectionContext.h |
| Include Path | #include "ToolMenuWidgetCollectionContext.h" |
template<typename WidgetType>
TSharedPtr< WidgetType > FindWidget() const
The widget, if found. A null pointer otherwise.
Parameters
| Name | Remarks |
|---|---|
| WidgetType | The type of widget to find. |