I tried a few things that I could think of - for example basing the data validation on cells on a worksheet and setting the colours of the different cells contents but nothing seemd to work. With regard to colour, the best that I could do - and this was using Excel not POI - was to apply conditional formatting to the cell so that AFTER you had selected an item from the list it's colour was changed; the list items all remained black however.
Recently, I have been digging around on the Excel forums (fora?) and MSDN and it seems that what you want to do is not possible within Excel. Even if you use a ComboBox control placed on the form, you are limited just to manipulating the font and possibly the colour of all of the items in the validations list; it does not seem to offer you the ability to enable/disable individual items nor to change the colour of each list item. Sorry for the bad news. Of course, I would never claim that my search was exhaustive and if you can find a way then do please post to the list so that we can try to emulate this behaviour using POI. Yours Mark B nagineni wrote: > > Hi, > > Can we disable list box value in XLS using POI API ?I've created list box > using HSSFDataValidation object and want to disable some of the items in > the list box.Also it it possible to apply font/colors to the list box > items ? > > Could any one let me know if we can achieve these features using POI > API,sample code is really helpful. > > Thanks in advance. > -- View this message in context: http://old.nabble.com/How-to-disable-list-box-values-in-XLS-using-POI-tp26357726p26393677.html Sent from the POI - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
