Does anyone know how to get the field names as the header for a listbox? I want the user to be able to scroll across the listbox and know what field values they are looking at.
Yes, except the code has already been written and involves two listboxes where the user can move a row back and forth from one listbox to the other. I didn't know they wanted all row fields and so have a stationary header for each listbox. I would have to re-write the whole thing to put it in two grids.
Yes, that is the problem, that there is no "header". How do I make a horizontally scrolling "header" for the columns in the listbox so the user will know what field values they are looking at?
Wouldnot it be most easy to extend the listboxitems with the requested additional (field) information (extra column)?
As suggested before a label can easily display the content of the selected listboxitem.
hth
-Bart
If Glamb already has a functioning listbox, and the only feature missing is the headers, the easiest solution would be to place a set of labels at the top of the grid - one label above each column.
But for anyone starting from scratch, a grid would be a better choice.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
there is the extra task of having labels over the listbox that would move, if you scroll horizontally (right<->left), as the listbox is not wide enough to hold all columns.
As it's a mover with two listboxes a solution might be to not put these two listboxes side by side but one underneath the other. Then you might have enough space horizontally to have simple fixed labels over all the columns.
Otherwise, yes, the simple task of scrolling headers is most easily achieved by a grid.
By the way I have designed such a control class with the UI Sepereated from the rest of the logic, so it does not matter much, if I use a listbox or grid. The only foundation is having two cursors options and selections, methods that move options to the selections cursor or vice versa and the UI is just blindly showing the cursors.
If you also separated your coding logic that way it should be quite easy to switch from listboxes to grids.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.