Skip to main content
New Participant
April 5, 2023
Question

cant add button widget into column component

  • April 5, 2023
  • 6 replies
  • 3 views

why i cant add a button widget in a column component , it says that the column component cant take button widget 

6 replies

anshurajsinghr3189
Participating Frequently
April 5, 2023

{ a!columnsLayout( columns: { a!columnLayout( contents: { a!buttonArrayLayout( buttons: { a!buttonWidget( label: "Button", style: "NORMAL" ) }, align: "START" ) } ), a!columnLayout( contents: {} ), a!columnLayout( contents: {} ) } ) }

Inspiring
April 5, 2023

To use a button widget, we have to use either a button layout or a button array layout. Further, if you want to use a button inside a column, you can use the code attached below.

{
  a!columnsLayout(
    columns: {
      a!columnLayout(
        contents: {
          a!buttonArrayLayout(
            buttons: {
              a!buttonWidget(
                label: "Button",
                style: "NORMAL"
              )
            },
            align: "START"
          )
          
        }
      ),
      a!columnLayout(
        contents: {}
      )
    }
  )
}

harshitb6843
Brainy
April 5, 2023

Please clarify if it is a column layout or a grid column. But in either of the cases, you can! If you face a problem, please attach the code. 

adityag9712
Inspiring
April 5, 2023

 a!columnLayout(
   contents: {
     a!buttonArrayLayout(
       buttons: {
         a!buttonWidget(label: "Button Label")
       }
     )
   }
 )

- Aditya
abhayd3663
Brainy
April 5, 2023

You can, but have to use the right level of nesting and using the correct syntax as suggested by other members.

New Participant
April 13, 2023

thanks sir