How to show a property of extensions on Designer only, but not in block drawer?

how to show a property of extensions on Designer only, but not in block drawer?

I see some component have property only in designer, but it is set by mock component. how to do it in extension?

Maybe you should use the userVisible property, Im not sure.

1 Like

I used the userVisible, the property indeed not show in blocks, but What I setup in designer not working. I will check again tomorrow.Thanks

Use only @DesignerProperty annotation.

userVisible is for block only, whether the block is visible or not.

1 Like
	@DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_BOOLEAN, defaultValue = "True")
	//@SimpleProperty(description = "")
	public void ShowLocateMeButton(boolean showLocateMeButton) {
		this.showLocateMeButton = showLocateMeButton;
	}

@SimpleProperty
	public boolean ShowLocateMeButton() {
		return this.showLocateMeButton;
	}

I did as your suggestion, the setter is hidden in the blocks, only showing at designer. But when I want to hide the getter, any change on this property in the designer do not work, unless I show the getter again.

I tried remove the @simpleProperty on the getter, or add 'userVisible = false'. But once the getter is hidden, the setter will not work.

It should work because at the end it is code can you please share the code that you tried to build extension.

source code send by PM.