Click here to Skip to main content
15,885,890 members
Please Sign up or sign in to vote.
3.00/5 (3 votes)
See more:
Hello,
How do I highlight text in a list box? For example, suppose the following text was in a list box:
MKCLLLALALTCGAQALIVTQTMKGLDIQKVAGTWYSLAMAASDISLLDAQSAPLRVYVE
ELKPTPEGDLEILLQKWENGECAQKKIIAEKTKIPAVFKIDALNENKVLVLDTDYKKYLL
FCMENSAEPEQSLACQCLVRTPEVDDEALEKFDKALKALPMHIRLSFNPTQLEEQCHI

Suppose I wanted to highlight: LAMAASD so it would be

MKCLLLALALTCGAQALIVTQTMKGLDIQKVAGTWYSLAMAASDISLLDAQSAPLRVYVE
ELKPTPEGDLEILLQKWENGECAQKKIIAEKTKIPAVFKIDALNENKVLVLDTDYKKYLL
FCMENSAEPEQSLACQCLVRTPEVDDEALEKFDKALKALPMHIRLSFNPTQLEEQCHI

but NOT bolded just highlighted?
Posted
Updated 22-Jun-11 7:12am
v2
Comments
MohamedHassanAli 22-Jun-11 0:13am    
Hi,
Do u want this in Textbox or Listbox. Please clarify. Title Misleading(TextBox in title and the content say List Box).
Thanks
J a a n s 22-Jun-11 0:21am    
You can't do this in a normal text box. Look for rich text box controls.
RakeshMeena 22-Jun-11 1:03am    
WinForms or ASP.Net??? A lot depends on what kind of application you are trying to build.

 
Share this answer
 
 
Share this answer
 
 
Share this answer
 
 
Share this answer
 
v2
Hope this[^] might help you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900