Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Do I need to Build a custom list box to make that work

Status
Not open for further replies.

ArvindKumar17

Programmer
Jan 7, 2003
13
MU
hi,
I am displaying one ListBox which is derived from the CListBox.
The recquirement for the ListBox are as follows:

the width of the row should be fixed.
But I should be able to increase the height of the row from code. In fact, my program should be able to

do that kind of thing according the response(input) from the users. The user is typing text which should be

displayed in one row of the listbox. In case that the lenght of the text is greater than the lenght of the

listbox ,the line of text will continue in the next line. That's the reason i need to increase the heoght of the

row from code.
Also, I need no horizontal scrollbar.

Should I build my own(custom) ListBox to contain all the above mentioned things? Should it be a owner

drawed list-box.

Please let me know.

regards
-arvind
 
Although nearly anything is possible if you work at it hard enough, I don't think that there's an "easy way" to get multiple lines in a list box to be treated as a single line unless you take over drawing the listbox yourself.

Usually, when things are hard to do, it means that you should re-think what you're trying to do. (Doctor, it hurts when I do this. Then don't do that.:)) Commonly, edit controls are used for multi-line text.

Grid controls behave more like you're describing because each cell is like an edit control. A Grid control with a single column looks like a list control where the "cells" may be multiple lines. Perhaps, you may be able to instantiate one of those.

DJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top