找回密码
 加入
搜索
查看: 1814|回复: 5

[AU3基础] [已解决]请教 <GuiListView.au3> UDF里面的HotItem函数用途...看不懂其翻译

  [复制链接]
发表于 2012-8-19 22:24:59 | 显示全部楼层 |阅读模式
本帖最后由 kk_lee69 于 2012-8-20 11:56 编辑

请教 <GuiListView.au3> UDF里面的HotItem函数用途...看不懂其翻译….
翻譯是 翻譯為 熱項....... 老實說 從翻譯上 我無法理解 可以運用在什麼時候.....
跑了範例....也時在看不出 熱項的用途 可以用在哪裡......

可能是因為我是對岸的同胞.....所以用語上 搞不太懂.....有人可以解釋一下
_GUICtrlListView_SetHotItem
_GUICtrlListView_GetHotItem
者兩個函數的意義 跟 可以運用在哪邊嗎??

感謝幫忙^^
发表于 2012-8-19 23:35:36 | 显示全部楼层
本帖最后由 netegg 于 2012-8-20 03:11 编辑

hotitem是当前的激活项
 楼主| 发表于 2012-8-20 10:15:37 | 显示全部楼层
回复 2# netegg
意思就是  當前被選定的對象嗎??

那他 跟 _GUICtrlListView_GetItemSelected  這個的差異在哪呢...??

我實際跑範例程式  好像也沒看到 有出現被選定的狀態??
发表于 2012-8-20 10:50:49 | 显示全部楼层
回复 3# kk_lee69

不是选定项,是激活项(待选定项)
发表于 2012-8-20 10:53:41 | 显示全部楼层
回复 1# kk_lee69

根本不是翻译的问题,更不是两岸用语的问题,而是你的知识面太窄了。
在那个程序或语言里都会有这个“热项”或什么“热按纽”等等,英语表达就是:hot item,hot button


也许下面的由帮助代码,我修改了点,你用鼠标在上面移动或点击选中一个item,看看输出,你就明白了
   

#include <GUIConstantsEx.au3>
#include <GuiListView.au3>

$Debug_LV = False ; Check ClassName being passed to ListView functions, set to True and use a handle to another control to see it work

_Main()

Func _Main()
        Local $exStyles = BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_GRIDLINES), $hListView

        GUICreate("ListView Set Hot Item", 400, 300)

        $hListView = GUICtrlCreateListView("", 2, 2, 394, 268)
        $hListView = GUICtrlGetHandle($hListView)
        _GUICtrlListView_SetExtendedListViewStyle($hListView, $exStyles)
        GUISetState()

        ; Add columns
        _GUICtrlListView_AddColumn($hListView, "Column 1", 100)
        _GUICtrlListView_AddColumn($hListView, "Column 2", 100)
        _GUICtrlListView_AddColumn($hListView, "Column 3", 100)

        ; Add items
        _GUICtrlListView_AddItem($hListView, "Row 1: Col 1")
        _GUICtrlListView_AddSubItem($hListView, 0, "Row 1: Col 2", 1)
        _GUICtrlListView_AddSubItem($hListView, 0, "Row 1: Col 3", 2)
        _GUICtrlListView_AddItem($hListView, "Row 2: Col 1")
        _GUICtrlListView_AddSubItem($hListView, 1, "Row 2: Col 2", 1)
        _GUICtrlListView_AddItem($hListView, "Row 3: Col 1")

        ; Loop until user exits
        Local $iHotItem, $iHotItemOri = 0, $iSelectItem, $iSelectItemOri = 0
        Do
                $iHotItem = _GUICtrlListView_GetHotItem($hListView)
                $iSelectItem = _GUICtrlListView_GetItemSelected($hListView, 1)
                If $iHotItem <> $iHotItemOri Or $iSelectItem <> $iSelectItemOri Then
                        ConsoleWrite("Hot Item: " & $iHotItem & "           " & $iSelectItem & @CRLF)
                        $iHotItemOri = $iHotItem
                        $iSelectItemOri = $iSelectItem
                EndIf
        Until GUIGetMsg() = $GUI_EVENT_CLOSE
        GUIDelete()
EndFunc   ;==>_Main

评分

参与人数 1金钱 +20 收起 理由
kk_lee69 + 20 太厲害了 果然一看就懂 感謝幫助

查看全部评分

 楼主| 发表于 2012-8-20 11:54:53 | 显示全部楼层
回复 5# happytc

感謝幫助  果然一看就懂.....多謝啦 解決我的疑問
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-9-30 01:33 , Processed in 0.088665 second(s), 27 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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