>>>
>>>.ColumnWidths = LTRIM(STR(.Width-IIF(.ListCount>EVL(.DisplayCount,7),39+SYSMETRIC(5),39)));
>>>+ REPLICATE(',0',.ColumnCount-1)
>>>
>>
>>Doesn't work. E.g. the affect is oposite - even if I have scrollbar, the drop-down width is less than the combo's width on the scrollbar's width.
>>
>>Let me see, if I can modify your code.
>
>Post the combo's Fontname,fontsize,FontBold,italic....
Fontsize is 8, FontName is Arial everything else is default VFP.
I already fixed your code by flipping the logic. The 39 is for long lists, for short list I have to make width bigger.
BTW, my colleague says, that this "39" number depends on screen resolution. For instance, he found that number to be 40. I guess, 1 pixel difference is not important, but it might be a problem for 400x640 and 1024x768
If it's not broken, fix it until it is.
My Blog