A powerful button component with Bootstrap-style variants, icon support, HTML text rendering, badge notifications, and comprehensive styling options.
TFlexFMXAdvancedButton extends the standard FMX button with:
bsPrimary - Blue primary buttonbsSecondary - Gray secondary buttonbsSuccess - Green success buttonbsDanger - Red danger buttonbsWarning - Yellow warning buttonbsInfo - Cyan info buttonbsLight - Light gray buttonbsDark - Dark buttonbsLink - Link-style button (transparent)bsOutline* - Outline variants of above stylesbsSmall (32px), bsDefault (40px), bsLarge (48px)
<b>Bold</b><i>Italic</i><s>Strikethrough</s><font size="20">Sized text</font><br> for line breaks
ImageList - Source image listImageIndex - Index of the iconPosition - Icon position (Left, Right, Top, Bottom, Center)UseTint - Apply color tintingTintColor - Tint colorScaleMode - isStretch, isFit, isCropSize - Icon size (0 = auto)Spacing - Space between icon and textPadding* - Padding around iconText - Badge text (empty or "0" hides badge)BadgeColor - Background color (default: Red)Position - Badge position (default: bpTopRight)OffsetX - Horizontal offset (default: 8)OffsetY - Vertical offset (default: -8)blImageAndText, blImageOnly, blTextOnly
Button1.ButtonStyle := bsPrimary; Button1.Text := 'Click Me'; Button1.ButtonSize := bsDefault;
Button1.ImageSettings.ImageList := ImageList1; Button1.ImageSettings.ImageIndex := 0; Button1.ImageSettings.Position := ipLeft; Button1.ImageSettings.UseTint := True;
Button1.UseHTMLText := True; Button1.HTMLText := '<b>Bold</b> text with <i>italic</i>';
Button1.BadgeSettings.Text := '5'; Button1.BadgeSettings.BadgeColor := TAlphaColors.Red;
Button1.GroupName := 'MyGroup'; Button1.StaysDown := True; Button2.GroupName := 'MyGroup'; Button2.StaysDown := True;
Button1.ButtonLayout := blImageOnly; Button1.ImageSettings.ImageList := ImageList1; Button1.ImageSettings.ImageIndex := 0; Button1.ImageSettings.Position := ipCenter; Button1.ImageSettings.ScaleMode := isFit;
| Event | Description |
|---|---|
| OnClick | Fired when button is clicked |
UseTint is enabledisFit scale mode