06-27-2010 08:33 PM
I have a multi-column listbox containing four columns. The fourth column is for notes, which will be of arbitrary length; they can get to be very lengthy. I want the cells in the "notes" column to have a constant width. When the width of the text is wider than the cell, I want the cell to automatically adjust its height and go to the next line so that all of the text is visible. For example,
|<--CELL WIDTH-->|
This is not the way ...I want the listbox cell to function.
This is the way I
want the listbox
cell to function.
06-27-2010 11:06 PM
Did you enable multi-line input, as the documentation for the control indicates? You would need to programmatically insert new lines in the text to get the row to autosize. If you search the forum for "autosize listbox" you will find this question has come up before, and examples have been posted showing how to autosize the columns. You should be able to adapt these to insert your new lines to perform the row autosize.
06-28-2010 06:58 AM
Yeah, I looked at the responses for questions like mine. Most of them adjust the width of the column to fit the text, which is not what I want to do. I figured that I would have to programmatically insert new lines when the text gets too long, I just wanted to make sure that there wasn't an easier solution before I spend the time developing the code to do that since it will take some time. Thanks.
06-28-2010 08:56 AM
Another option is to use an ActiveX control or .NET control. You can search the web for grids, and a few examples have been posted on the forums. A search should bring them up.