Announcement

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

    How to stop word wrap by truncation or clipping?

    I am using SmartClient_v111p_2017-09-14_LGPL in IE11.

    When I set the value of a field, setContents, the text will wrap if the field id not long enough. Is there a way to have the text truncated, or better, clipped?


    Code:
    isc.HLayout.create({
        height: 20,
        zIndex: 150,
        membersMargin: 0,
        layoutMargin: 0,
        showBorder: false,
        members: [
            {                                    type: "text", width: 103, enabled: false, showBorder: false },
            { ID: "_cboConfigDdlTxtConfigID"   , type: "text", width:  70, enabled: false, border: "1px solid black", overflow: "hidden" },
            { ID: "_cboConfigDdlTxtTitle"      , type: "text", width: 250, enabled: false, border: "1px solid black", wrap: false, clipValue: true },
            { ID: "_cboConfigDdlTxtDescription", type: "text", width: 300, enabled: false, border: "1px solid black", wrap: false, clipValue: true },
            { ID: "_cboConfigDdlTxtDatime"     , type: "text", width:  70, enabled: false, border: "1px solid black", overflow: "hidden" },
            { ID: "_cboConfigDdlTxtID"         , hidden: true, width:   1 }
        ]
        })

    #2
    This is odd code - it looks like you took field definitions from a DynamicForm and copied and pasted them as the members area of a Layout. Then the members/ fields Array is a mishmash of properties that apply to Canvas and properties that apply
    to FormItem.

    If you meant to ask about Canvas-based widgets, overflow:hidden is what accomplishes clipping. For a StaticTextItem, it's clipValue.

    Comment

    Working...
    X