brady gaster

yadnb

CheckedListBox and Text Wrapping

For the love of God, does anyone have any idea how to do this? I don't need a walk-through on how winforms works. I just need the CheckedListBox control in .Net 1.1 ( you know, the one that's still in production, not in BETA, and that everyone's forgetting people still work with ) to automatically wrap the text of the items in it. I don't need anyone to point me to dotnet247 so that I can learn how the base class ListBox does it because the CheckedListBox doesn't fire/own the same events as its base class (go figure, someone was really thinking when they inherited this piece of @&#^ control from it). I'm on a deadline, I'm obviously stressed, and I need a quick answer to a problem that IMHO shouldn't exist in the first place. Amazon gift certificate goes to the first solution provided.

Comments

Srikanth Bhakthan said:

Worth a look http://www.codeproject.com/cs/combobox/fixedcheckedlistbox.asp

Also the following should do the Text Wrap
http://www.mastercsharp.com/India/Forums/ShowPost.aspx?PostID=769

Incase of webforms,then
<asp:listitem><nobr><%#databinder.eval(...)%></nobr></asp:listitem>
Where <nobr> does the trick.

Eventually the code will look like
<asp:CheckBoxList id="checkboxlist1" runat="server">
<asp:ListItem><nobr>Item</nobr></asp:ListItem>
</asp:CheckBoxList>

Thanks,
Srikanth

# August 3, 2005 10:54 AM

brady gaster said:

DID YOU READ THE DAMNED POST? THERE'S NOT A CHECKEDLISTBOX IN THE ASP.NET FRAMEWORK, LAST TIME I CHECKED! COULD YOU PLEASE READ THE QUESTION AGAIN? I'M TALKING WINDOWS FORMS HERE, PEOPLE.
# August 3, 2005 10:59 AM

Bharani said:

ColumnWidth property should do it.
# August 3, 2005 11:09 AM

brady gaster said:

I guess I'm going to have to start posting in Indian. I don't care about the ColumnWidth. Or the ASP.Net crap. I want a checkedlistbox item to span multiple lines, in a windows forms environment.

What's so complicated about that?
# August 3, 2005 11:19 AM

Raymond Lewallen said:

Probably not what you want to hear, but you're probably going to have to create your own WordWrappingCheckedListBox control, and actually "draw" it all out. I've yet to see anybody do it with CheckedListBox controls, but I have seen code floating around for doing the same thing with other controls that don't support word wrapping by default and you need multiline columns.
# August 3, 2005 11:22 AM

brady gaster said:

Now that's what I call an answer. Thanks for the help. Doesn't get me a single step closer to my solution as its totally overkill.

But then again, I'm not programming in Java, am I? Given the framework, I guess overkill's the norm.
# August 3, 2005 11:23 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)