2 Replies Latest reply on Jul 22, 2011 4:34 AM by chalukya

    Expand To Fit for Drop-down list

    chalukya Level 2

      Hi All,


      Why expand to fit option is disabled for drop-down list?

      Is there any way to make the drop-down field expandable as per the data selected?


      Thanks and Regards-


        • 1. Re: Expand To Fit for Drop-down list
          Bibhu Bikash Nayak Level 4

          Hi Chalukya,


          Though not sure, still I guess all the values in a dropdown are pre-existing or if we use dynamic properties to update the dropdown we can know atleast what could be it's length.May be that's the reason expand options are not available.


          But if you want to expand it you can do so a bit of scripting.


          When we select something from the dropdown through change event we can get the vairable length. If the variable/item length is greater than a particular value then we can expand the dropdown.


          In the change event of the dropdown :

          You have to use FormCalc if you want to use Len otherwise you can use an array in javascript.


          if(Len($event.change))   > 10


                    this.w = "10inch";





          1 person found this helpful
          • 2. Re: Expand To Fit for Drop-down list
            chalukya Level 2

            Hi Bibhu,


            Thanks for ur reply.


            May be u r right about the expand to fit option for ddl.


            Your code works fine with the field width to expand, but if we try to do the same with the height the field gets expanded height wise but the data does not wrap around.


            I am trying to achive this by hiding the text field and ddl one behind the other.


            Thanks a lot once again.