Fantastic! This works perfectly, thanks. James
-----Original Message----- From: Laurent ROCHER [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 10:01 AM To: perl-win32-gui-users@lists.sourceforge.net Cc: Bunch, James Subject: Re: [perl-win32-gui-users] Setting Maximum Text Entry For A Combo Box 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