Hi, Actually, no Win32::GUI::ComboBox method do that, but you can limit text using a SendMessage. Something like that :
use constant CB_LIMITTEXT => 0x0141; $combobox->SendMessage(CB_LIMITTEXT, $limit, 0); See : http://msdn.microsoft.com/library/en-us/shellcc/platform/commctls/comboboxes/comboboxreference/comboboxmessages/cb_limittext.asp Laurent > > Hi there - I've used "AddComboBox" to create a nice, functional combo > box and it is working great for the most part now that I've sorted out which > "addstyle" values to use to replace the old deprecated -style=> values. I am > wondering if there is any way to set a limit on the number a characters a > user can enter into the box. Basically I want something like the "MaxLength" > setting used for a textfield. Currently, I'm using a poor workaround for > this by disabling the horizontal scroll and limiting the actual width of the > combobox, but this allows a different number of characters in depending on > which characters are used (it lets in more "I"s than "M"s for example). > > James