cancel
Showing results for 
Search instead for 
Did you mean: 

sap.ui.layout.form.FormContainer styling

Former Member
0 Kudos

new sap.ui.layout.form.FormContainer({

}),

Hello,

I have a formcontainer being instantiated as above (except the real one has a bunch of content in it) and I was wondering if there is a way to style this specific form container. I cannot add an ID to it for functional reasons and when i try .addStyleClass("classname") it gives an error. Does anyone know how I can add a style class to this specific formcontainer?

thank you so much in advance!

Accepted Solutions (0)

Answers (1)

Answers (1)

kedarT
Active Contributor
0 Kudos

Hi Edward,

Use toggleStyleClass more info - SAPUI5 SDK - Demo Kit

Hope this helps.

Former Member
0 Kudos

that gives me an error :Uncaught TypeError: (intermediate value).toggleStyleClass is not a function

similar to the error when i do .addStyleClass

former_member182372
Active Contributor
0 Kudos

Class sap.ui.layout.form.FormContainer

extends Element

SAPUI5 SDK - Demo Kit

abstract Class sap.ui.core.Control

extends Element

SAPUI5 SDK - Demo Kit

FormContainer is NOT a Controle 😉 so method is not availble

as a workaround you can try to use $() which is available for every control and add a deleagte for on defore rendering and apply style there