>I have a combobox drop-down list based upon an array. Is there an easier way to set the ColumnWidth Property in pixels than guessing the width. For instance, I choose 100 pixels and see how everything looks/fits, then I choose 150 pixels and so on until I get a near-perfect fit for the rows of items in the combobox columns.
>
>I use Builder to set it for me automatically when I have a combobox based upon a Value, but I can't use that method for array based combobox values.
>
>What's the preferred way to set the ColumnWidth in pixels for an array-based combobox? Is there a magic formula I can use to estimate it based upon the maximum number of characters in a drop-down list row?
>
>Just wondering. I would like all my drop-down lists to look nicer width-wise. And I hate to waste time sizing my ColumnWidths if there is an easier/better way. TIA!
Steve,
There are more than one ways. Check txtwidth() for one. Another one is to create a label object temporarily and set its autosize to .t. and caption to longest text, get width and blow label.
Cetin