# Widget and Variable Names

Above the WorkShop Visual design area are two fields labeled Widget Name and Variable Name.

Widget Name

The Widget Name is the name by which a widget is known to the X window system - it is the name by which resources specific to the widget are accessed from the X resource database.

Widget Names differ from Variable Names in that they do not have to be unique. You can create a logical class or group of objects which share common resources by having a shared Widget Name, so that setting or changing a single resource within the resource database will cause that resource to be applied across all your widgets sharing the name.

Variable Name

The Variable Name is the name used to identify the widget within generated source code - it is the variable identifier of the widget. Every widget within your widget hierarchy must have a unique Variable Name specified within WorkShop Visual. By default, WorkShop Visual automatically allocates Variable Names (widget1, widget2, ...) as they are created; unless you change the name, this will be the variable for the widget within the generated code.

In Microsoft Windows mode, if the variable name field is pink this indicates that the selected widget will not be mapped to an object on Microsoft Windows.

You can search for a string in a widget or variable name through all the widgets in your design by using the search facility.

NOTES

If you want to explicitly access a widget within your application code and callbacks you should provide a Variable Name of your own.

See also:

- Microsoft Windows mode
- Search
- About WorkShop Visual