Skip to main content
New Participant
Apr 5, 2023 6:16 AM UTC
Question

cant add button widget into column component

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
Apr 5, 2023 6:26 AM UTC

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

Inspiring
Apr 5, 2023 8:09 AM UTC

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
Apr 5, 2023 9:50 AM UTC

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
Apr 5, 2023 10:54 AM UTC

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

- Aditya
abhayd3663
Brainy
Apr 5, 2023 3:07 PM UTC

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

New Participant
Apr 13, 2023 9:57 AM UTC

thanks sir