maxf4 发表于 2014-8-5 16:48:38

【已解决】GUICtrlCreateInput命令生成的输入框,如何设置使其支持文字换行

本帖最后由 maxf4 于 2014-8-21 14:20 编辑

如题,代码如下,在备注栏中输入文字,按回车无法换行,求助!#include <SliderConstants.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>


GUICreate("clock")
GUISetState()
GUICtrlCreateLabel("倒计时时间(min)",20,45,100,40)
Local $time=GUICtrlCreateInput("",120,30,100,40)
Local $click=GUICtrlCreateButton("开始倒数",250,30,60,40)
Local $daojishi=GUICtrlCreateLabel("",20,100,300,30)


GUICtrlCreateInput("备注",20,150,300,50)
Local $msg = 0
    While $msg <> $GUI_EVENT_CLOSE
      $msg = GUIGetMsg()
      Select
            Case $msg = $click
                Local $time2=GUICtrlRead($time)
   
                  ;MsgBox(0,"",$time)
                  Local $_count=0
                  ;MsgBox(0,"",$_count)
                  Do
                         $_count=$_count+1
                         ;MsgBox(0,"",$_count)
                         Sleep(990)
                                               GUICtrlSetData($daojishi,$time2*60-$_count+1)

                  Until $_count>$time2*60
                  
                  MsgBox(0,"","时间到!!!")
                                       
                        Case $msg =$GUI_EVENT_CLOSE
                  ExitLoop
          EndSelect
         
    WEnd

user3000 发表于 2014-8-5 22:58:36

回复 1# maxf4

欲显示换行文字,应该创建EDIT控件,而非INPUT控件!

maxf4 发表于 2014-8-6 09:23:47

本帖最后由 maxf4 于 2014-8-21 14:06 编辑

十分感谢!

austere 发表于 2014-8-9 17:16:04

回复 3# maxf4


    问题解决了就把标题后面修改成【已解决】,不要老挂在这里~
页: [1]
查看完整版本: 【已解决】GUICtrlCreateInput命令生成的输入框,如何设置使其支持文字换行