#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("文档", 433, 313, 193, 115)
$Button2 = GUICtrlCreateButton("保存", 120, 8, 97, 25, 0)
$Button1 = GUICtrlCreateButton("打开", 8, 8, 97, 25, 0)
$Edit1 = GUICtrlCreateEdit("", 8, 40, 409, 257)
GUICtrlSetData(-1, "")
$Combo1 = GUICtrlCreateCombo("选择", 232, 8, 185, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button2
$FileSave = FileSaveDialog ("保存",@WindowsDir & "", "文本文档 (*.txt)|所有文件 (*.*)", 16 )
$read = GUICtrlRead ($Edit1)
FileWrite ($FileSave,$read)
Case $Button1
$FileOpen = FileOpenDialog ("打开",@WindowsDir & "", "文本文档 (*.txt)|所有文件 (*.*)",1+2+4)
$Fread = FileRead ($FileOpen)
EndSwitch
WEnd
怎样可以实现文本文档那样自动换行用 GUICtrlCreateEdit 有滚动条,还有点 打开 文件后导入文档内容怎样让文档内容显示在 输入框内
Case $Button1
$FileOpen = FileOpenDialog ("打开",@WindowsDir & "", "文本文档 (*.txt)|所有文件 (*.*)",1+2+4)
$Fread = FileRead ($FileOpen)
GUICtrlCreateEdit($Fread, 8, 40, 409, 257)
这样虽然能显示出来,可点一下输入框就边成空,没有文档内容 |