开发者

How do I embed GroupBoxes in a ListView?

开发者 https://www.devze.com 2023-01-24 12:01 出处:网络
I have numerous groupboxes that need to be listed in a ListView. I have tried: listView1.Controls.Add(new NewsBox());

I have numerous groupboxes that need to be listed in a ListView.

I have tried:

listView1.Controls.Add(new NewsBox());

(NewsBox bei开发者_如何学JAVAng a custom class derived from GroupBox, just with standard labels and a definite size)

Anyways, that works for listing the first controlbox, but not for 2 or more.

Any ideas?


This won't work. You can't have multiple GroupBoxes in a ListView control.

To add things to a ListView, use myListView.Items.Add(...).

0

精彩评论

暂无评论...
验证码 换一张
取 消