Definition from Tech Target
In computers, a widget is an element of a graphical user interface ( gui ) that displays information or provides a specific way for a user to interact with the operating system and application . Widgets include icons, pull-down menus, buttons, selection boxes, progress indicators, on-off checkmarks, scroll bars, windows, window edges (that let you resize the window), toggle buttons, forms, and many other devices for displaying information and for inviting, accepting, and responding to user actions.
In programming, a widget also means the small program that is written in order to describe what a particular widget looks like, how it behaves, and how it interacts in response to user actions. Most operating systems include a set of ready-to-tailor widgets that a programmer can incorporate in an application, specifying how it is to behave. New widgets can be created. The term was apparently applied first in UNIX -based operating systems and the X Window System . In object-oriented programming ( oop ), each type of widget is defined as a class (or a subclass under a broad generic widget class) and is always associated with a particular window. In the AIX Enhanced X-Window Toolkit, a widget is the fundamental data type .