How to make string dropdown or selectable list on @DesignerProperty

how to make string dropdown or selectable list on @DesignerProperty.
and how to create helper block in rush.

Current version of Rush doesn’t support Helper blocks.

1 Like

but i github have kotlin class for helper block on rush repository.
Helper.kt

This is from Rush 2.0 which is still under development.

okay thank’s for your reply, and can you help for create dropdown selectable on designerproperty like tis:
image

Why don’t you check App Inventor sources instead?

2 Likes

i already think adout this check app inventor source, thanks for your suggestion.

1 Like

See below code.

@DesignerProperty(editorType = "choices", 
 defaultValue = "default",
 editorArgs = {"default", "rounded", "rectangular", "oval"})
@SimpleProperty(description = "Set shape for component.")
public void Shape(String shape) {
 // Do what you want to do with the `shape`.
}
1 Like

i used this on kotlin but not working.

@DesignerProperty(editorType = "dropdown", defaultValue = "Fit center", editorArgs = ["Center", "Center crop", "Center inside", "Fit center", "Fit end", "Fit start", "Fit XY", "Seam carving", "Scale-to-fit"])
    @SimpleProperty(description = "Sets the scale type of the image.")
    fun ImageScale(scale: String) {
        imageScale = scale
    }

if use this method then i got error to use ;

Just replace the dropdown with choices.

1 Like

thanks for your help, :pray:, dhannobad dada.

1 Like