PRIM_MD.Badge - BadgeFlow Property

Position of the badge relative to other badges on the control

Member of PRIM_MD.Badge (PRIM_MD.Badge)

Data Type - Enumeration

Details

The BadgeFlow property controls how badges will position themselves when multiple badges are attached to the same Control.

Multiple badges can flow when they have the same BadgeAlignment.

Allowed Values

Enum ValueDescription
CenterHorizontalFlow horizontally using the space equally
CenterVerticalFlow horizontally using the space equally
DownFlow down using the first item as the start point
LeftFlow to the left using the first item as the start point
NoneNone
RightFlow to the right using the first item as the start point
UpFlow up using the first item as the start point

Example

In this example, clicking the button will add one to the red badge value.
Begin_Com Role(*EXTENDS #PRIM_WEB) Theme(#SYS_THEME) Height(313) Width(737)

   Define_Com Class(#PRIM_TBLO) Name(#Layout1)
   Define_Com Class(#PRIM_TBLO.Row) Name(#Layout1Row1) DisplayPosition(1) Parent(#Layout1)
   Define_Com Class(#PRIM_TBLO.Column) Name(#Layout1Column1) DisplayPosition(1) Parent(#Layout1)

   Define_Com Class(#PRIM_MD.RaisedButton) Name(#Button) Caption('Click') DisplayPosition(1) Left(80) Parent(#COM_OWNER) TabPosition(1) ThemeDrawStyle('MediumAccent') Top(40) Height(49) Width(129)
   Define_Com Class(#PRIM_MD.Badge) Name(#BadgeRed) Caption('1') Control(#Button) DisplayPosition(1) Height(20) IconAlignment(Center) TabPosition(1) TabStop(False) ThemeDrawStyle('MediumError') Top(-10) Width(20) Left(119) BadgeFlow(Left)
   Define_Com Class(#PRIM_MD.Badge) Name(#BadgeBlue) Caption('1') Control(#Button) DisplayPosition(2) Height(20) IconAlignment(Center) Left(99) TabPosition(2) TabStop(False) ThemeDrawStyle('MediumTitle') Top(-10) Width(20) BadgeFlow(Left) BadgeMarginRight(0)
   Define_Com Class(#Prim_nmbr) Name(#ClickCount)

   Evtroutine Handling(#Button.Click)

      #ClickCount += 1
      #BadgeRed := #ClickCount.AsString
      #BadgeRed.Visible := #ClickCount > 0

   Endroutine

End_Com

See also

All Component Classes

Technical Reference

V14 SP2 - November 2017