?
Solved

Change the Text of a ListBox Item?

Posted on 2007-11-25
4
Medium Priority
?
1,181 Views
Last Modified: 2013-12-03
HI,

In my Listbox I have from time to time a changed value. Is it possible to change the text of a ListBox Item, like index 2 by code?

Ingo
0
Comment
Question by:Ocrana
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20345853
are you working with MFC's CListView? could you post some code where to make modifications?
0
 

Author Comment

by:Ocrana
ID: 20345888
Hi, no I use CListBox
0
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 2000 total points
ID: 20345981
Unfortunately, there is not such feature with regular listboxes. You have 2 choices.
- Delete and insert an item again
- Use owner draw to change the text whenever you want
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20347241
Do you have choosen an alternative?
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question