center([component])

Class: MenuBar. Method inherited from UIComponent.

Description:

Positions the component in the center of it's parent component, owner Window (if Window has an owner Window), or screen (Window only).
Applies only to components that have position() property (not like menu, menu item, tray icon, etc.)

Parameters:

Name Type Default Description

[component]

Object

null

If provided, this component will be positioned in the center of the provided component.

Returns:

Returns this component.

Type: this