Discussion:
[Lazarus] badge/pill/chip component ?
Michael Van Canneyt via Lazarus
2018-05-05 16:30:27 UTC
Permalink
Hi,

I'm looking for a badge/pill/chip kind of component.

https://getbootstrap.com/docs/4.0/components/badge/

Any idea whether this exists for lazarus ?

Michael.
--
AlexeyT via Lazarus
2018-05-05 17:07:15 UTC
Permalink
Hi
I can (want) to write ATBadge component.
Planned props:

AutoSize
Color
ColorInner (for inner colored text)
Font
FontInner
Radius (1..50 in %)
Caption
CaptionInner

Alex
--
Michael Van Canneyt via Lazarus
2018-05-05 19:19:14 UTC
Permalink
Post by AlexeyT via Lazarus
Hi
I can (want) to write ATBadge component.
AutoSize
Color
ColorInner (for inner colored text)
Font
FontInner
Radius (1..50 in %)
Caption
CaptionInner
I had in mind a TBadge with the above props, and then also

Property Shape: TBadgeShape = (rounded, roundrect) ; // Maybe others
Property ImageList : TImagelist
Property CloseBadge : Boolean;
Property Items : TBadgeItems;

With
TBadgeItem = CLass(TCollectionItem)
Public
Property Data : Pointer
Published
Property Caption : String;
ImageIndex : Integer;
Tag : PtrInt
end;

Events :
OneBadgeClose : Procedure (Sender : TObject; aBadge: TBadgeItem; var Allow : Boolean);
OnBadgeClick : Procedure (Sender : TObject; aBadge: TBadgeItem);
OnBadgeImageClick : Procedure (Sender : TObject; aBadge: TBadgeItem);

So the badge component actually draws a collection of badges.

Does that suit your use-case and wishes? If so, please go ahead, I am
curious :)

Michael.
--

Loading...