Reputation: 37500
Using C++/CLI and Windows Forms, I'm trying to make a simple scrollable list of labelled text controls as a way of displaying some data fields. I'm having trouble making a TableLayoutPanel
scrollable - every combination of properties I've tried seems to result in some really peculiar side effects.
So I have two questions:
Upvotes: 0
Views: 139
Reputation: 942020
TLP is not designed to be scrollable. You'll want a FlowLayoutPanel.
Beware that you'll usually end up with a rather large number of windows which will make your program very slow. Painting becomes noticeably laggy when you get more than about 50 controls in a form. The best solution is a control that can display multiple items but only needs a single Window handle. ListBox, ListView with View = Details, DataGridView are good examples of controls that can do this. They also allow custom painting to tweak their view so you can get it just the way you want it.
Upvotes: 2