Hello. My listbox displays long records. I’d like to split the display of fields into two parts. The left side shows in a listbox only primary key values, and the rest of the fields of just the row in focus on the right side of the window arranged like a data entry form. I’ve looked at imSplitter and WindowSplitter, but my beginner mind can’t grok how to integrate either in my window. What’s an alternative approach to implement this design? Two windows side-by-side maybe?
you don’t specify the type of project you would like to build, whether Desktop or Web. The difference lies is in the controls available and their properties. That being said, on a window you may have to the left a list box showing only a few columns - database columns - that let the user identify a specific row. On the right you would have all the controls needed to display all columns from the record.
When the Window is loaded, you query only the columns used in the listbox and create the litsbox rows. When a specific row is selected in the listbox, you make a new query to gather all the columns for that row and display the values in the controls to the right. It a master-detail view.
I would not display the primary key because it’s used by the database and has no value for the user. The user should NEVER be allowed to change key values, these values being created by the database.
Hope that helps.
What were you wishing to use a splitter for? I use imSplitter, and found the examples that come with it to be helpful. In addition, I eventually learned that if you appropriately use the LockTop etc properties of a control (see the Position part of the Inspector), then when the contraining control is resized, everything within it resizes too.
Hi. Exactly what I hope to accomplish (it’s a desktop app). I had been working on pulling the full records as I build the master listbox, and populating the controls in the details area with values already in memory, hoping that would be quicker, but just couldn’t get it to work. I will try your suggestion, of a separate data base read for the selected record. Thank you.
Just trying to implement the classic ui of master-detail, where the master panel (a listbox) allows navigation up and down the list of records in the corresponding table and searching for a record in the listbox, and the details panel (the work area) showing details of the record in focus. I couldn’t get the details controls to synch with the selected record. I will try Gilles P’s suggestion of a separate read from the database of the selected record; maybe I’ll have some luck there.