【问题标题】:How to get title of a columnt in TListView control?如何获取 ListView 控件中列的标题?
【发布时间】:2013-08-15 23:10:15
【问题描述】:

我只知道ControlListView 函数:http://www.autoitscript.com/autoit3/docs/functions/ControlListView.htm

并且有一个选项GetText 有两个参数用于行和列,但是我看不到任何内容来获取列标题的文本,这是用户可以通过鼠标单击的地方,例如按那个排序列等

【问题讨论】:

    标签: autoit


    【解决方案1】:

    您可以尝试使用_GUICtrlListView_GetColumn。此函数返回一个数组,其中包含有关给定 ListView 列的信息。

    Local $aCol = _GUICtrlListView_GetColumn($lvwMsgTable, 0)
    ConsoleWrite('Title of column 0: ' & $aCol[5] & @LF)
    
    $aCol = _GUICtrlListView_GetColumn($lvwMsgTable, 1)
    ConsoleWrite('Title of column 1: ' & $aCol[5] & @LF)
    
    $aCol = _GUICtrlListView_GetColumn($lvwMsgTable, 2)
    ConsoleWrite('Title of column 2: ' & $aCol[5] & @LF)
    

    我不知道这是否适用于 TListView。

    【讨论】:

      猜你喜欢
      • 2019-10-11
      • 2010-10-07
      • 2023-03-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多