Solved

Editable list box with multiple columns

Posted on 1997-05-19
2
163 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
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Separate into files by filename 12 66
dog bark java program 15 81
abstract class with all non abstract mentods 6 71
Fibonacci challenge 11 81
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

762 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now