CustomButton Xojo Plugin

CustomButton Control

LibraryDescription
"A push button that is not based on the operating system theme."

RectControl
   CustomButton

control CustomButton

Properties

AcceptFocusThis property is for Mac only where focus is normally not active unless Full Keyboard access is on. Setting this to true activates focus support even if full keyboard access is not turned on in the system.
AccessibilityLabelLabel used by the macOS accessibility manager for various of disability settings and devices.
ArcSizeSize of the Arc when the button shape is round.
AutoWidthThis property is to support components such as the FlowLayout. If set to true then the FlowLayout may resize the button.
BoldSets the text font to bold.
BorderColorThe border color for the button when it is in normal state.
ButtonColorSets the body color of the button when button is enabled.
ButtonDownColorSets the body color of the button when button is pushed down.
ButtonHoverColorColor for when mouse is hovered over the button.
ButtonShapeConfigures the shape of the button, Rounded or Rectangular.
ButtonTypeConfigures how the button should behave, Button, Toggle, Sticky, Split or Menu.
CaptionSets or gets the text on the button.
CaptionAlignSets the alignment of the text.
CaptionDeltaXTweaks the position of the text in x direction.
CaptionDeltaYTweaks the position of the text in y direction.
CaptionPlacementThis property is to configure how the caption is placed.
DBBackColorFills background with custom color when in double buffering mode. (MacOS X and Linux systems are always double buffered by the OS it self)
DMBorderColorThe border color for the button when it is in normal state in dark mode if SeparateDarkModeStyle is set to true.
DMButtonColorSets the body color of the button when button is enabled in dark mode if SeparateDarkModeStyle is set to true.
DMButtonDownColorSets the body color of the button when button is down in dark mode if SeparateDarkModeStyle is set to true.
DMButtonHoverColorColor for when control is in dark mode and mouse is hovered over the button.
DMDisabledBorderColorThe border color for the button when it is in disabled state in dark mode if SeparateDarkModeStyle is set to true.
DMDisabledButtonColorSets the body color of the button when button is disabled in dark mode if SeparateDarkModeStyle is set to true.
DMDisabledTextColorSets text color of the button when button is disabled in dark mode if SeparateDarkModeStyle is set to true.
DMFocusColorColor for the focus on the button when button in dark mode if SeparateDarkModeStyle is set to true.
DMIconSets the button icon when button in dark mode if SeparateDarkModeStyle is set to true.
DMSplitLineColorSets the split line color of the button when button is enabled in dark mode if SeparateDarkModeStyle is set to true.
DMTextColorSets text color of the button when button is enabled in dark mode if SeparateDarkModeStyle is set to true.
DMUseSystemFocusColorWhen system is in dark-mode and SeparateDarkModeStyle is set to true then If this property is set to true then the button will attempt to use system focus color when possible, having fallback to the controls focus color.
DebugDataSizeUsed for internal quality control of the plugin.
DisabledBorderColorThe border color for the button when it is in disabled state.
DisabledButtonColorSets the buttons main body color when button is disabled.
DisabledTextColorSets the text color when button is disabled.
DoubleBufferDoubleBuffers the drawing of the control on Windows systems. (MacOS X and Linux systems are always double buffered by the OS it self)
Enabled (Inherited) Determines if the control should be enabled when the owning window is opened.
FocusColorColor for the focus on the button.
FocusDrawingTypeConfigures how focus should be represented.
Handle (Inherited) Returns a handle to the control.
HasBorderIf set to true then the button will have border and it will use the BorderColor properties.
HasDBBackColorIf set to true then the color defined in the DBBackColor property will be used as background color when in double buffer mode. (MacOS X and Linux systems are always double buffered by the OS it self)
HasHoverColorIf set to true then Hover color will be used from the ButtonHoverColor and DMButtonHover color properties, else their auto calculated based on the button main color.
Height (Inherited) The height (in points) of the control.
IconSets icon for the button.
IconAlignSets the alignment of the icon on the button.
IconDeltaXTweaks the position of the icon in x direction.
IconDeltaYTweaks the position of the icon in y direction.
Index (Inherited) If the control is used in a control set, this specifies the control's index in the set.
ItalicSets the text font to italic.
Left (Inherited) The left side of the control in local coordinates (relative to the window)
MaxWidthThis property is to support components such as the FlowLayout. The property defines the maximum width the button may scale to.
MenuThe root menu item of the control. To add menu items then you manipulate this menu item.
MinWidthThis property is to support components such as the FlowLayout. The property defines the minimum width the button may scale to.
MouseX (Inherited) The X coordinate of the mouse (points). Measured from the top-left corner of the window.
MouseY (Inherited) The Y coordinate of the mouse (points). Measured from the top-left corner of the window.
PanelIndex (Inherited) If the control has been placed on a TabPanel or PagePanel control, this is the panel (page/tab) that the control is on. If the control is not on a panel, it returns -1.
SeparateDarkModeStyleIf set to true then the color style properties from the DM (DarkMode) named properties will be used when the system is in Darkmode.
SplitLineColorSets the color for the split line when the button is in Split mode.
TextColorSets the text color when button is enabled.
TextFontSets the text font
TextSizeSets the text font size.
TextUnitSets the unit of the FontSize.
ToolButtonIf set to true then the button will not get focus on click on platforms where it normally would have gotten the focus when clicked.
Top (Inherited) The top of the control in local coordinates (relative to the window).
UnderlineSets the text font to underlined.
UseSystemFocusColorIf set to true then the button will attempt to use system focus color when possible, having fallback to the controls focus color.
ValueIf the button is in Toggle or Sticky mode then this property can read and write the state.
Visible (Inherited) Determines whether the control is visible when its owning window is opened. The default is True: the control is visible.
Width (Inherited) The width (in points) of the control.
Window (Inherited) The control's parent window.

Methods

Close (Inherited) Closes a control.
GetOptimalWidthReturns optimal width of the control for the text and settings that have been assigned to it.
PressVisually simulates mouse press on the button.
ReloadEventsReloads events if having used AddHandler to subscribe events.
SetFocus (Inherited) If applicable, sets the focus to the DesktopUIControl. KeyDown events are directed to the control.

Events

ActionThe CustomButton has been clicked.
Close (Inherited) The control is about to close.
ConstructContextualMenu (Inherited) This event is called when it is appropriate to display a contextual menu for the control.
ContextualMenuItemSelected (Inherited) Fires when a contextual menuitem selectedItem was selected but the MenuItemSelected event and the MenuHandler for the MenuItem did not handle the menu selection.
DragEnter (Inherited) Fires when the passed DragItem enters the RectControl.
DragExit (Inherited) Fires when the passed DragItem exits the RectControl.
DragOver (Inherited) Fires when the DragItem is over the RectControl.
DropObject (Inherited) The item represented by Obj has been dropped on the control.
GotFocusThe button has gotten focus.
KeyUp (Inherited) Fires when the passed Key is released in the control that has the focus.
LostFocusThe button has lost the focus.
MenuActionThis event is fired when a menu item on the button has been clicked.
MouseDownThe mouse button was pressed inside the CustomButton’s region.
MouseDragThis event is fired when the mouse is dragged with the mouse button down on the control.
MouseEnterThis event is fired when the mouse enters the controls region.
MouseExitThis event is fired when the mouse exits the controls region.
MouseMoveThis event is fired when the mouse is moved over the controls region.
MouseUpThis event is fired when the mouse button goes up.
MouseWheel (Inherited) The mouse wheel has been moved.
PreProcessStyleOverrides style attribute on the button right before rendering. The override is for current rendering and alter base properties of the button.

Constants

Version = 4.7

Supported Platforms:

  • macOS Intel 64 bit
  • macOS Apple Silicon
  • Windows 32 bit
  • Windows 64 bit
  • Windows ARM 64 bit
  • Linux 32 bit
  • Linux 64 bit
  • Linux ARM 32 bit
  • Linux ARM 64 bit