📄 subject_57002.htm
字号:
<p>
序号:57002 发表者:木木二中 发表日期:2003-10-22 11:21:58
<br>主题:ListBox怎么设置多列?
<br>内容:ListBox怎么设置多列?怎么在多列的ListBox里添加?
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
回复者:浪际天涯 回复日期:2003-10-22 11:28:02
<br>内容:为什么不用ListCtrl呢?不过好像ListBox也有设置多列的,但我没用过
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:下次用什么名字? 回复日期:2003-10-22 14:11:19
<br>内容:有个属性是Multi Column吧,勾选就可以了
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:木木二中 回复日期:2003-10-22 19:00:14
<br>内容:我选了勾后呢?该怎么往里面添加数据呢?
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:木木二中 回复日期:2003-10-23 08:56:48
<br>内容:没人用过吗?
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:风之文章 回复日期:2003-10-23 09:07:01
<br>内容:listbox->属性->styles->view->report<BR>CListCtrl m_cListZipin<BR><BR> m_cListZipin.InsertColumn(0,_T("No"),LVCFMT_LEFT,100);<BR> m_cListZipin.InsertColumn(1,_T("Unicode"),LVCFMT_LEFT,120);<BR> m_cListZipin.InsertColumn(2,_T("CJK+code"),LVCFMT_LEFT,100);<BR> m_cListZipin.InsertColumn(3,_T("Hanzi"),LVCFMT_LEFT,100);<BR> m_cListZipin.InsertColumn(4,_T("字次"),LVCFMT_LEFT,100);<BR> m_cListZipin.InsertColumn(5,_T("覆盖率%%"),LVCFMT_LEFT,100);<BR> m_cListZipin.InsertColumn(6,_T("累加覆盖率%"),LVCFMT_LEFT,120);<BR> m_cListZipin.InsertColumn(7,_T("部首编号"),LVCFMT_LEFT,100);<BR> m_cListZipin.InsertColumn(8,_T("部首"),LVCFMT_LEFT,100);<BR> m_cListZipin.InsertColumn(9,_T("部外笔画数"),LVCFMT_LEFT,120);<BR>int index;<BR><BR>int nItem=m_cListZipin.InsertItem(index,(_bstr_t)vNO);<BR> m_cListZipin.SetItem(nItem,1,1,(_bstr_t)vUcode,NULL,0,0,0);<BR> m_cListZipin.SetItem(nItem,2,1,(_bstr_t)vCjk,NULL,0,0,0);<BR> m_cListZipin.SetItem(nItem,3,1,(_bstr_t)vHanzi,NULL,0,0,0);<BR> m_cListZipin.SetItem(nItem,4,1,(_bstr_t)vZici,NULL,0,0,0);<BR> m_cListZipin.SetItem(nItem,5,1,(_bstr_t)str_wfb,NULL,0,0,0);<BR> m_cListZipin.SetItem(nItem,6,1,(_bstr_t)vAddwfb,NULL,0,0,0);<BR> m_cListZipin.SetItem(nItem,7,1,(_bstr_t)vRadno,NULL,0,0,0);<BR> m_cListZipin.SetItem(nItem,8,1,(_bstr_t)vRad,NULL,0,0,0);<BR> m_cListZipin.SetItem(nItem,9,1,(_bstr_t)vStroke,NULL,0,0,0);
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:木木二中 回复日期:2003-10-23 09:30:01
<br>内容:你所说的是ListCtrl吧,我是说ListBox。<BR>我下别人的程序看了下,好像是通过owendraw出来的。<BR>可能只有这种办法,谢谢各位了!
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:下次用什么名字? 回复日期:2003-10-23 09:39:53
<br>内容:ListBox的多列和ListCtrl的多列意思不一样,<BR>ListBox你AddString就可以了,假如你的ListBox不高,只能显示10行,而你AddString了11行,第11行就会自动在换到下一列显示,这与ListCtrl的多列概念不一样<BR>如果你要多列,每列的保存不同的内容,如5楼那般,就要用ListCtrl<BR>ListCtrl的用法5楼说了,我再说一次:)<BR>假如3列:<BR> m_ListCtrl=&GetListCtrl();//如果你是自己画的控件就不必了<BR> m_ListCtrl->ModifyStyle(NULL,LVS_REPORT+LVS_EDITLABELS);<BR> m_ListCtrl->SetExtendedStyle(LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES);<BR> m_ListCtrl->ShowWindow(SW_SHOW);<BR> m_ListCtrl->InsertColumn(0,"序号",LVCFMT_LEFT,36); <BR> m_ListCtrl->InsertColumn(1,"类目代码",LVCFMT_LEFT,60); <BR> m_ListCtrl->InsertColumn(2,"合同号",LVCFMT_LEFT,140);<BR>假如3行:<BR> m_ListCtrl->InsertItem(0,"0");<BR> m_ListCtrl->InsertItem(1,"1");<BR> m_ListCtrl->InsertItem(2,"2");<BR>添加单元格内容:<BR> m_ListCtrl->SetItemText(0,1,"单元格的内容");<BR><BR>注意这里说的是ListCtrl,至于ListBox,你就AddString好了
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:木木二中 回复日期:2003-10-23 09:48:52
<br>内容:哦,这个意思。谢谢你!
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -