Announcement

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

    Align title for dropdown with multiple select option

    I want to have a dropdown with multiple select option. The title should be vertically aligned at the top, leftside to the dropdown.
    But its appearing at the top of the dropdown.
    Content:
    Content 1
    Content 2
    Content 3
    Content 4

    My code is:
    isc.DynamicForm.create
    ({
    ID: "Content",
    top: 20,
    left: 20,
    fields:
    [
    {
    name: "content", title: "Content", type: "select",
    defaultValue: "R1",
    multiple: "true",
    titleOrientation: "top",
    overflow: "visible",
    height: 60,
    width: 250,
    valueMap:
    {
    "R1" : "Content 1",
    "R2" : "Content 2",
    "R3" : "Content 3",
    "R4" : "Content 4",
    "R5" : "Content 5",
    "R6" : "Content 6"
    }
    }
    ]
    });

    Thanks in advance.

    #2
    You have explicitly set titleOrientation:"top". Just remove this and the title will appear at the left of the dropdown, which is the default.

    Comment


      #3
      Thanks for the reply Isomorphic...

      It Appears on the left side, but not at the top of left side.
      It appears as
      Code:
                  Content 1
                  Content 2
      Content :   Content 3
                  Content 4
                  Content 5
      
      I wanted to have it as
      Content:    Content 1
                  Content 2
                  Content 3
                  Content 4
                  Content 5

      Comment


        #4
        You can do this via CSS. Having defined a CSS style like this:
        Code:
            .topTitle {
                vertical-align:top;
                font-family:Verdana,Bitstream Vera Sans,sans-serif; font-size:11px;
            }
        .. you could apply it just to an item like this:
        Code:
            isc.DynamicForm.create({
                ID:"theForm",
                autoDraw:true,
                backgroundColor:"cyan",
                items: [
                    { name : "text", type:"text" },
                    { name : "textArea", type:"textArea", titleStyle:"topTitle" }
                ]
            });
        ... or to TextAreaItems in general like this:
        Code:
            isc.TextAreaItem.addProperties({ titleStyle:"topTitle" });

        Comment


          #5
          Hi Isomorphic

          Thanks a lot... It worked :)

          Comment

          Working...
          X