Card Layout

Certified Associate Developer

I have a card layout as below. Can anyone help If there a way for the button to not have that extra space before and after the rich text no matter what magnification or resizing of the screen is shown.

a!columnLayout(
                                          contents: {
                                            a!cardLayout(
                                              tooltip: "Only Assigned Status Tasks will be processed",
                                              contents: a!richTextDisplayField(
                                                align: "CENTER",
                                                value: {
                                                  
                                                  a!richTextItem(
                                                    text: "ACCEPT TASKS",
                                                    color: "ACCENT",
                                                    style: "STRONG",
                                                    
                                                  )
                                                  
                                                },
                                               
                                              ),
                                              link: a!dynamicLink(
                                                value: "ACCEPT",
                                                saveInto: local!acceptTask,
                                                showWhen: count(
                                                  tointeger(local!gridSelection.selected)
                                                ) <= 50
                                              ),
                                              style: "ACCENT"
                                            )
                                          },
                                          width: "NARROW"
                                        )

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    As indicated by others, best to use buttons for this.

    Otherwise if you insist on using a cardLayout you can try setting the margins on the richTextDisplayField

    a!localVariables(
      local!acceptTask,
      local!selected,
      a!columnLayout(
        contents: {
          a!cardLayout(
            tooltip: "Only Assigned Status Tasks will be processed",
            contents: a!richTextDisplayField(
              align: "CENTER",
              marginAbove: "NONE",
              marginBelow: "EVEN_LESS",
              value: {
                a!richTextItem(
                  text: "ACCEPT TASKS",
                  color: "ACCENT",
                  style: "STRONG" 
                )
              }
            ),
            link: a!dynamicLink(
              value: "ACCEPT",
              saveInto: local!acceptTask,
              showWhen: count(tointeger(local!selected)) <= 50
            ),
            style: "ACCENT"
          )
        },
        width: "NARROW"
      )
    )

Reply
  • 0
    Certified Lead Developer

    As indicated by others, best to use buttons for this.

    Otherwise if you insist on using a cardLayout you can try setting the margins on the richTextDisplayField

    a!localVariables(
      local!acceptTask,
      local!selected,
      a!columnLayout(
        contents: {
          a!cardLayout(
            tooltip: "Only Assigned Status Tasks will be processed",
            contents: a!richTextDisplayField(
              align: "CENTER",
              marginAbove: "NONE",
              marginBelow: "EVEN_LESS",
              value: {
                a!richTextItem(
                  text: "ACCEPT TASKS",
                  color: "ACCENT",
                  style: "STRONG" 
                )
              }
            ),
            link: a!dynamicLink(
              value: "ACCEPT",
              saveInto: local!acceptTask,
              showWhen: count(tointeger(local!selected)) <= 50
            ),
            style: "ACCENT"
          )
        },
        width: "NARROW"
      )
    )

Children