Announcement

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

    StaticTextItem's icon next to value instead of field's width?

    We have a dynamic form where we want to display multiple StaticTextItem items.

    The form fields' widths are variable and, in order to control the layout, we use "clipStaticValue : true" on the StaticTextItem items so they all [potentially] use the ellipse and have identical _maximum_ width.

    We'd like to have an icon on those StaticTextItem items to the right of the _text_ value (as opposed to the right of the _form field_).

    I used http://www.smartclient.com/#formIcons as a start for my little example.

    Here is the modified version:
    Code:
    isc.DynamicForm.create({
        fields : [
    
        {name: "severityLevel",
          width : 400,
          title: "Severity Level",
          wrapTitle: false,
          editorType: "StaticTextItem",
          defaultValue: "Severity 2",
          icons: [{
            src: "other/help.png"
          }]
        },
        {name: "severityLevel2",
          width : 400,
          title: "Severity Level",
          wrapTitle: false,
          editorType: "StaticTextItem",
          defaultValue: "Severity with a much longer value...",
          icons: [{
             src: "other/help.png"
          }]
        }
       ]
    });
    Is there a way to have the icon next to the right-hand side of the text instead of far out to the right ?

    We're using v11.0p_2016-08-13/Pro

    Thanks !

    -C
    Last edited by Isomorphic; 3 Nov 2016, 11:40. Reason: formatted code block

    #2
    Hi C,
    This is not currently supported. In order to have a StaticTextItem clip its content, we need a specified width for the text. We then render out HTML at that width with the textual value in it, and any icons are rendered after the text box.
    It sounds like what you are hoping for is an item which expands to fit its content (with the icon appearing next to that content), up to a certain point and then starts clipping.

    We currently have no plans to implement this, but if it's important to you, we would consider it eligible for feature sponsorship. Let us know if you'd like us to take a look at what would be involved and get you a quote.

    Regards
    Isomorphic Software

    Comment

    Working...
    X