如何使lit内文字自动换行?和某1行红色?
本帖最后由 wuluck 于 2009-6-27 16:02 编辑#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GUIConstants.au3>
#include <StaticConstants.au3>
$Form1 = Guicreate("Form 1", 400, 400, -1, -1)
$list = GUICtrlCreateList("准备中", 176, 32, 121, 57)
GuiSetState(@SW_SHOW)
While 1
$Msg = GUIGetMsg()
sleep(1000)
sleep(1000)
GUICtrlSetData($list, @HOUR & ":"& @MIN & ":" & @SEC & "测试
111111111114")
ControlFocus("Form 1", "", $list)
ControlSend ("Form 1","",$list,"{END}")
sleep(1000)
GUICtrlSetData($list, @HOUR & ":"& @MIN & ":" & @SEC & "测1111111111试
4"& @CR & @CR & "11111114")
ControlFocus("Form 1", "", $list)
ControlSend ("Form 1","",$list,"{END}")
sleep(1000)
GUICtrlSetData($list, @HOUR & ":"& @MIN & ":" & @SEC & "测11111111111试
4")
ControlFocus("Form 1", "", $list)
send("{END}")
sleep(1000)
GUICtrlSetData($list, @HOUR & ":"& @MIN & ":" & @SEC & "测试11111114")
ControlFocus("Form 1", "", $list)
send("{END}")
sleep(1000)
GUICtrlSetData($list, @HOUR & ":"& @MIN & ":" & @SEC & "测111111试4")
Switch $Msg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
Wend
后面很多字被隐藏了.....
用GUICtrlSetData 重写 测试不实用...会导致不在最后行了
颜色用 GUICtrlSetColor 会导致整个框内文字变色的.只需要某一行变色.该用哪一个?好像说要GUICtrlCreateListView才能某行变色.. #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这样变色? 嗯.我改成了GUICtrlCreateListView了
请问如果框框太小出现水平滚动条怎么办?
页:
[1]