ListView Headers Don't Show Up

删除回忆录丶 提交于 2019-12-04 15:13:45

问题


I am doing a windows mobile application 6.1.

I dragged in a listview and went to columns and added columns to my list view. When I run the listview they do not show up.

I then tried to add them through C# code on page load with the follow code.

ColumnHeader header = new ColumnHeader();
            header.Text = "gkgag";
            header.Width = 100;
            header.TextAlign = HorizontalAlignment.Center;
            listView1.Columns.Add(header);

this does not work either. Why don't they show up?


回答1:


You must use detailed view for column headers to be visible.


listView1.View = View.Details;

If that´s not the problem, column headers might be hidden behind windows systembar.



来源:https://stackoverflow.com/questions/1936798/listview-headers-dont-show-up

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!