David Schwartz 426 Posted August 6, 2019 I'd like to have a check-list, but I want the user to be able to edit its contents easily, mostly by adding new entries and maybe reordering them. (I'm using checkboxes to avoid deleting things that may be used sometimes but not always. It's not going to be common to delete things in this case.) The way I've done this in the past, and how I've usually seen it done, is to somehow overlay a memo and a checklistbox of some sort, maybe using a page control. If you want to edit it, the data is loaded into a memo and the memo is displayed. When you want to go back to select items, the data is loaded into the checklistbox and it is displayed instead. Most line-oriented controls like TListBox and TListView aren't easy to edit. Memos are what people are most used to. I'm curious if anybody has any other approach that's worth trying? Share this post Link to post
Trevor S 2 Posted August 6, 2019 I suggest considering the TVirtualTreeview control https://www.jam-software.com/virtual-treeview/ It can be configured to behave like a Listbox or checklistbox and supports inline editing of the text. 1 Share this post Link to post
dummzeuch 1505 Posted August 6, 2019 I second VirtualTreeview, but be prepared for a steep learning curve. (Every time I use it in a new project I have to look up how to use it.) Share this post Link to post
David Schwartz 426 Posted August 6, 2019 Yeah, I've suffered through using that sucker a few times. I think it's more work than I want to put in. Any other ideas? 1 Share this post Link to post
Stefan Glienke 2002 Posted August 6, 2019 21 minutes ago, David Schwartz said: I think it's more work than I want to put in. Learning about one of the most powerful and free controls the VCL has to offer - yeah what a waste of time 😜 Share this post Link to post
David Heffernan 2345 Posted August 6, 2019 34 minutes ago, David Schwartz said: Yeah, I've suffered through using that sucker a few times. I think it's more work than I want to put in. Any other ideas? I guess it depends on what motivates you. Do you want to optimise for the quality of your program's UX, or is it more important to you that you can create the UX as quickly as possible, irrespective of how well it works? Share this post Link to post
David Schwartz 426 Posted August 7, 2019 (edited) I appreciate these suggestions. Right now I'm just building a prototype of something and I don't want to get distracted learning to use a control for a something that might not even end up being used. I'm just curious what other solutions might be available ... how others may have solved this problem. Edited August 7, 2019 by David Schwartz Share this post Link to post
Darian Miller 361 Posted August 7, 2019 Depending on the count of items...you could use a list of dynamically created frames within a scroll box. Each frame has your checkbox/memo and you add a way to Add/Edit/Delete items. I've done this a few times with success. Share this post Link to post
Uwe Raabe 2057 Posted August 7, 2019 What about a TClientDataSet connected to a TDBGrid or TDBCtrlGrid? 1 Share this post Link to post
Микола Петрівський 10 Posted August 7, 2019 (edited) 35 minutes ago, Uwe Raabe said: What about a TClientDataSet connected to a TDBGrid or TDBCtrlGrid? This is, probably, the simplest possible solution, if you limit yourself to "out of the box" solutions. By the way, TClientDataSet can be replaced with TFDMemTable. Edited August 7, 2019 by Микола Петрівський Share this post Link to post
David Schwartz 426 Posted August 8, 2019 On 8/6/2019 at 6:39 PM, Darian Miller said: Depending on the count of items...you could use a list of dynamically created frames within a scroll box. Each frame has your checkbox/memo and you add a way to Add/Edit/Delete items. I've done this a few times with success. I guess that would work. It also makes me think of accordion controls. 23 hours ago, Uwe Raabe said: What about a TClientDataSet connected to a TDBGrid or TDBCtrlGrid? No, that seems backwards. But I think I get your idea. 🙂 Share this post Link to post