faceyao 发表于 2010-8-28 16:02:23

为何别人做的form里面的lable和input和button可以用Tab键切换(已解决)

本帖最后由 faceyao 于 2010-8-29 10:12 编辑

而我建的form只能通过鼠标点来点去来切换到下一个input,

也就是不能通过键盘的Tab切换到本控件

飘云 发表于 2010-8-28 18:10:19

主窗口建立时加个样式$WS_TABSTOP,就能切换了

faceyao 发表于 2010-8-28 22:19:05

回复 2# 飘云

应该不是这个原因,试过了,按照上面写仍然不行的

xsjtxy 发表于 2010-8-28 22:20:22

回复 3# faceyao


    把你的整个脚本源码贴出来看才知道原因。

faceyao 发表于 2010-8-29 10:12:12

回复 4# xsjtxy

奇怪,我现在试了又可以了#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate("Form1", 613, 435, 192, 132)
$Button1 = GUICtrlCreateButton("Button1", 224, 320, 161, 49)
$Input1 = GUICtrlCreateInput("Input1", 16, 24, 209, 24)
$Input2 = GUICtrlCreateInput("Input2", 104, 96, 225, 24)
$Input3 = GUICtrlCreateInput("Input3", 200, 168, 241, 24)
GUISetState(@SW_SHOW)


While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit

        EndSwitch
WEnd

chamlien 发表于 2014-9-14 18:35:45

$WS_TABSTOP很管用,以测试
页: [1]
查看完整版本: 为何别人做的form里面的lable和input和button可以用Tab键切换(已解决)