Change the Text of a ListBox Item?

Posted on 2007-11-25
Medium Priority
Last Modified: 2013-12-03

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?

Question by:Ocrana
  • 3
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?

Author Comment

ID: 20345888
Hi, no I use CListBox
LVL 55

Accepted Solution

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
LVL 55

Expert Comment

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

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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 member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

619 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