Default "margin" of Compound Widget

Hi
I created a compound widget and want to define a default “margin” of it.
Everytime I add my CW on a content it’s margin is set to “0px” by default but I would like to have a margin of “0px 2px”.

The width and height can be adjustet in the CW but if I try to add the property “margin” in the first line of the CW I always get an error “…margin attribute is not declared..”

image

Is it possible to define the default margin of a CW?

Hi Stefan,

I assume you’re using mappView 6.

In mappView 5.24, the property isn’t available, and I get this compiler error:

10 Error 03.02.2026 09:00:25,4889 The ‘margin’ attribute is not declared., XML syntax error. The object cannot be loaded. Ln:2, Col:60

Perhaps the margin value is overridden in the content. Can you open the content in a text editor and check this? But I think the margin property would then be highlighted in bold.

You’ve probably already tried a rebuild.

Maybe someone else has another idea :see_no_evil_monkey:

Hi @Stefan_Ruttimann , what is the final answer on your question, have you investigated it?

I have no solution yet for this issue…

Looks like that this question you have to ask using local B&R support channel.