How to Calculate the Width of Combobox at runtime.

Hello All,

I want to calculate the width of combo box at run time and set this width to drop down box.
So can anybody help me regarding this with a sample code.??


you may set automatic width. In this case, the list will be adjusted to option width automatically: