Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2018-05

badge/pill/chip component ?

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Van Canneyt
to AlexeyT
AlexeyT wrote 12 lines
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

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.

Reply by email