DesktopBevelButton.Icon

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Property (As Picture )
aDesktopBevelButton.Icon = newPictureValue
or
PictureValue = aDesktopBevelButton.Icon

New in 2021r3

Supported for all project types and targets.

The name of the graphic to use as the icon.

Notes

Drag the graphic to the Project Editor or import it using File ↠ Import. Icon supports pictures from any source, including those created at runtime with the Picture constructor. It also supports transparency, either by setting the Transparent property of the Picture to 1 or via the Picture’s Mask.

Sample Code

The following code places an icon in the bevelbutton, aligns it, and specifies the placement of the caption. The image, "DatabaseQuery," has been added to the project.

Me.Icon = DatabaseQuery
Me.IconAlign = 6
Me.CaptionAlign = 0
Me.CaptionPlacement = 2
Me.IconDX = 2
Me.IconDY = 1