Solved

Editable list box with multiple columns

Posted on 1997-05-19
2
176 Views
Last Modified: 2013-11-19
I need to create an editable list box with multiple columns. Similar to a spreadsheet where you can enter data in each column and the corresponding data on each row gets updated when you scroll. How can this be done? Is there a sample source somewhere that I can look at?
0
Comment
Question by:dtan
  • 2
2 Comments
 
LVL 10

Accepted Solution

by:
RONSLOW earned 100 total points
ID: 1301665
What you seem to be asking for is a grid cotrol.  VC comes with DBGrid - you can go to the TrueDBGrid web site and upgrade to the better TrueDBGrid (free)

Other than that, I'd start with a CListCtrl rather than a list box.  You can then popup a dialog when the user clicks on a row to allow you to edit any of the columns.  If you really want inplace editing, you'd need to write a bit of code that would respond to left or right mouse clicks, determine the row and column the mouse is over, and create and place an edit box over the cell so you can edit the value.

The better solution if you want inplace editing is to use the grid control that comes with VC (or get the one from the true-grid site).

True DBGrid is at http://www.apexsc.com/truedbgrid.html

0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 1301666
Oops - I gave you the URL for the pro version instead of the free one .. go to http://www.apexsc.com/truedbgridstandard.html
0

Featured Post

ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Unix / Linux grid computing 5 157
How to determine file rename from EventLog ? 2 49
sumDigits challenge 9 150
How to convert MFC::CString to UTF8 wchar_t* 10 211
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

810 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