楼主,富文本比较少讨论,上代码看看
lynfr8 发表于 2010-6-7 22:56 #include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#Include <GuiRichEdit.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("富文本", 443, 307, 192, 124)
$Edit1 = _GUICtrlRichEdit_Create($Form1, "", 0, 0, 441, 177,$WS_HSCROLL)
$Edit2 = _GUICtrlRichEdit_Create($Form1, "", 0, 184, 441, 73)
$Button1 = GUICtrlCreateButton("Button1", 336, 272, 105, 33)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_GUICtrlRichEdit_AppendText($Edit1,@YEAR&"-"&@MON&"-"&@MDAY&" "&@HOUR&":"&@MIN&":"&@SEC&@LF&_GUICtrlRichEdit_GetText ($Edit2)&@LF)
EndSwitch
WEnd
不加样式正常,一加样式,换行后的内容都无法赋给了,感谢关注 |