Defined in:Finds a widget with a particular key.
Widget *FindWidget(const char *key) const;
|The key value of the widget to find.
FindWidget function returns a pointer to the first widget in the subtree having a key matching the
key parameter. If no such widget exists, or the
key parameter is the empty string, then the return value is
Multiple widgets can have the same key value, and the
FindWidget function returns a pointer to the first widget with the specified key, in the order in which widgets were preprocessed. To iterate over all widgets having the same key value, call the
Widget::GetNextWidgetWithSameKey function repeatedly until it returns
FindWidget function can only be called after the root widget has been preprocessed because the internal structures used to search for widgets are established during the preprocessing step. Thus, it is common for calls to
FindWidget to appear in the
PreprocessWidget function implementation in subclasses of the