[Lazarus] badge/pill/chip component ?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] badge/pill/chip component ?

Free Pascal - Lazarus mailing list

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.
--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] badge/pill/chip component ?

Free Pascal - Lazarus mailing list
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
--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] badge/pill/chip component ?

Free Pascal - Lazarus mailing list


On Sat, 5 May 2018, AlexeyT via Lazarus wrote:

> 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.
--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus