可以用ListView来做到:
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ListviewConstants.au3>
$Form1 = GUICreate("Form1", 633, 447, 193, 125)
$List1 = GUICtrlCreateListView(" ", 80, 64, 460, 230,$LVS_NOCOLUMNHEADER)
GUICtrlSendMsg($List1, 0x101E, 0, 455)
GUISetState(@SW_SHOW)
$I = GUICtrlCreateListViewItem("这个是红色", $List1)
GUICtrlSetColor(-1, 0xFF0000)
$I = GUICtrlCreateListViewItem("这个是黑色", $List1)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
|