Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    PickerIcon inside ComboBoxItem instead of after

    Is it possible to get the ComboBoxItem to display a picker icon inside the field, on the left side of the data, instead of as separate FormItemIcon after the field? I'd like it to look like the attached image.

    I'm using SmartGWTEE 3.0.

    Thanks
    Attached Files

    #2
    Yes, it's possible but a little tricky (we plan to make it easier):

    1. if it's sufficient for the icon to be non-interactive you can add it as a CSS background image in the textBoxStyle. Be sure to add padding so the text doesn't overlap it.

    2. if it needs to be an interactive element you should combine a form with a ComboBoxItem with an ImgButton for the icon in an HLayout. You will need to remove the default borders on the ComboBoxItem (via textBoxStyle, etc) as well as setting showPickerIcon:false, then add borders on the HLayout so they go around both your ImgButton and your form containing the ComboBoxItem.

    Comment


      #3
      If I make this suggested new widget a DynamicForm, is there way to make a DynamicForm a FormItem so it can be inside an existing DynamicForm and be useable by the datasource, etc?

      Would using a CanvasItem with an HLayout containing an ImgButton and ComboBoxItem, instead of a DynamicForm be a better approach?

      Comment


        #4
        You can make it a reusable FormItem via creating a CanvasItem that automatically creates the HLayout containing the ImgButton and DynamicForm.

        An HLayout cannot directly contain a ComboBoxItem, hence the intervening DynamicForm.

        Comment

        Working...
        X