ContextMenuProperties
The ContextMenuProperties class defines styling and behavior for context menus, including colors, borders, animations, and skins. It uses a builder pattern for configuration.
This is to provide easy configuration of ContextMenu while allowing backwards compatibility.
Key Properties
backgroundColor: Menu background color (default: semi-transparent gray).
borderColor, borderWidth: Border styling (default: black, 1px).
padding, heightOffset: Spacing and vertical offset from widgets.
shadow, roundedCorners, cornerRadius: Visual effects.
hoverEffect, hoverColor: Hover interaction styling.
enableAnimations: Toggles scale animations.
skin:
Skininstance (default:ClassicSkin). (Learn more about Skins in the next section)
Key Methods
builder(): Creates a
Builderfor property configuration.clone(), cloneWithSkin(): Copies properties for reuse.
getBackgroundColor(), getSkin(), etc.: Property accessors.
Usage
Configure via Builder when creating a ContextMenu. Example:
Last updated
Was this helpful?