找回密码
 加入
搜索
查看: 2575|回复: 7

哪位能翻译一下_GUICtrlListView_SimpleSort 谢谢

[复制链接]
发表于 2008-6-29 01:19:48 | 显示全部楼层 |阅读模式
可以对list view进行排序的函数,但没有翻译,哪位朋友能帮忙翻译一下。

_GUICtrlListView_SimpleSort
--------------------------------------------------------------------------------

Sorts a list-view control (limited)


#Include <GuiListView.au3>
_GUICtrlListView_SimpleSort($hWnd, ByRef $vDescending, $iCol)




参数

$hWnd Handle to the control
$vDescending Can be:
True - Sort Descending
False - Sort Ascending
Array - With the following format:
[0] - First Column
[1] - Second Column
[n] - Last Column



返回值

None.



注意

This is a basic sort fuction, for advanced sort see GUICtrlRegisterListViewSort
 楼主| 发表于 2008-6-29 01:48:42 | 显示全部楼层
或者用这个示范一下。

#include <GUIConstants.au3>

GUICreate("listview items",220,250, 100,200,-1,$WS_EX_ACCEPTFILES)
GUISetBkColor (0x00E0FFFF)  ; will change background color

$listview = GUICtrlCreateListView ("col1  |col2|col3  ",10,10,200,150);,$LVS_SORTDESCENDING)
$button = GUICtrlCreateButton ("Value?",75,170,70,20)
$item1=GUICtrlCreateListViewItem("item2|col22|col23",$listview)
$item2=GUICtrlCreateListViewItem("item1|col12|col13",$listview)
$item3=GUICtrlCreateListViewItem("item3|col32|col33",$listview)
$input1=GUICtrlCreateInput("",20,200, 150)
GUICtrlSetState(-1,$GUI_DROPACCEPTED)   ; to allow drag and dropping
GUISetState()
GUICtrlSetData($item2,"ITEM1")
GUICtrlSetData($item3,"||COL33")
GUICtrlDelete($item1)

Do
  $msg = GUIGetMsg ()
          
   Select
      Case $msg = $button
         MsgBox(0,"listview item",GUICtrlRead(GUICtrlRead($listview)),2)
         Case $msg = $listview
         MsgBox(0,"listview", "clicked="& GUICtrlGetState($listview),2)
   EndSelect
Until $msg = $GUI_EVENT_CLOSE
发表于 2008-6-29 02:14:25 | 显示全部楼层
这不是窗体列表的“点击排序”吗?会用就行,用不着咬文嚼字的。
 楼主| 发表于 2008-6-29 22:16:19 | 显示全部楼层
是窗体列表的“点击排序“,但不会用。。。
发表于 2008-6-30 04:32:58 | 显示全部楼层
汗。。。帮助明明有例子,不会用?出错还是什么原因?
 楼主| 发表于 2008-6-30 23:25:53 | 显示全部楼层
是出错,因为帮助里的变量经过了多次获取,弄得我头晕了。
如果您能帮忙告诉我。$hWnd, ByRef $vDescending, $iCol
这三个变量分别代表什么什么,就可以了,谢谢
发表于 2008-8-19 00:10:04 | 显示全部楼层
j加三句话
列表排序的方法

Dim $B_DESCENDING[_GUICtrlListView_GetColumnCount ($ListView3_1_1)]
GUICtrlSetOnEvent($ListView3_1_1,"compositor")
Func compositor()
  GUICtrlListView_SimpleSort ($ListView3_1_1, $B_DESCENDING, GUICtrlGetState($ListView3_1_1))
EndFunc
发表于 2009-5-19 03:48:04 | 显示全部楼层
_GUICtrlListView_SimpleSort
排序列表视图控件(有功能限制)
_GUICtrlListView_SimpleSort ( $ hWnd , ByRef $ vDescending , $ iCol )
参数:
$ hWnd句柄控制
$ vDescending  可以是:
True-排序降序
True-排序递增
True-以下格式:
[ 0 ] -第一栏
[ 1 ] -第二栏
[ n ] -最后一栏

返回值
none .

注意
这是一个基本的排序功能,更强大的功能见GUICtrlRegisterListViewSort
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-23 03:18 , Processed in 0.103933 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表