找回密码
 加入
搜索
查看: 1980|回复: 6

列表框与图片控件的问题

  [复制链接]
发表于 2011-6-24 23:54:58 | 显示全部楼层 |阅读模式
我给新建的窗口加了图片控件之后,列表框就点击无作用了,请高手们帮忙呀!
我的代码如下:
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>


#Region ### START Koda GUI section ### Form=c:\users\mgj\desktop\form1 - 副本.kxf
$Form1_1 = GUICreate("Form1", 802, 450, 215, 173)
FileInstall(@ScriptDir & "\8.jpg", @HomeDrive&"\8.jpg")
$Pic1 = GUICtrlCreatePic(@HomeDrive&"\8.jpg", -16, 0, 817, 449)
$Input1 = GUICtrlCreateInput("012345678", 8, 232, 177, 45, BitOR($GUI_SS_DEFAULT_INPUT,$WS_BORDER))
GUICtrlSetFont(-1, 24, 800, 0, "MS Sans Serif")
$Input2 = GUICtrlCreateInput("012345678", 312, 232, 177, 45, BitOR($GUI_SS_DEFAULT_INPUT,$WS_BORDER))
GUICtrlSetFont(-1, 24, 800, 0, "MS Sans Serif")
$Input3 = GUICtrlCreateInput("012345678", 616, 232, 177, 45, BitOR($GUI_SS_DEFAULT_INPUT,$WS_BORDER))
GUICtrlSetFont(-1, 24, 800, 0, "MS Sans Serif")
$Button1 = GUICtrlCreateButton("清空", 8, 8, 75, 25)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
$Button2 = GUICtrlCreateButton("01234567890123456", 208, 16, 361, 65)
GUICtrlSetFont(-1, 24, 800, 0, "MS Sans Serif")
$Combo1 = GUICtrlCreateCombo("", 190, 232, 121, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "①扣除|①加上|①乘以|①除以", "①扣除") ; 在列表框中添加新的项目,并设置一个新的默认值
GUICtrlSetFont(-1, 24, 800, 0, "MS Sans Serif")
$Combo2 = GUICtrlCreateCombo("", 494, 232, 121, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "②扣除|②加上|②乘以|②除以", "②乘以") ; 在列表框中添加新的项目,并设置一个新的默认值
GUICtrlSetFont(-1, 24, 800, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

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

        EndSwitch
WEnd
 楼主| 发表于 2011-6-25 00:46:58 | 显示全部楼层
就是用鼠标点击列表框,不会出现下拉选项!
把图片控件$Pic1 = GUICtrlCreatePic(@HomeDrive&"\8.jpg", -16, 0, 817, 449)删除后就不会现在这现像,请高手们帮忙啊
发表于 2011-6-25 03:01:52 | 显示全部楼层
把GUICtrlCreatePic控件禁用即可。代码如下:
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=c:\users\mgj\desktop\form1 - 副本.kxf
$Form1_1 = GUICreate("Form1", 802, 450, 215, 173)
FileInstall(@ScriptDir & "\8.jpg", @HomeDrive&"\8.jpg")
$Pic1 = GUICtrlCreatePic(@HomeDrive&"\8.jpg", -16, 0, 817, 449)
GUICtrlSetState(-1, $gui_disable)
$Input1 = GUICtrlCreateInput("012345678", 8, 232, 177, 45, BitOR($GUI_SS_DEFAULT_INPUT,$WS_BORDER))
GUICtrlSetFont(-1, 24, 800, 0, "MS Sans Serif")
$Input2 = GUICtrlCreateInput("012345678", 312, 232, 177, 45, BitOR($GUI_SS_DEFAULT_INPUT,$WS_BORDER))
GUICtrlSetFont(-1, 24, 800, 0, "MS Sans Serif")
$Input3 = GUICtrlCreateInput("012345678", 616, 232, 177, 45, BitOR($GUI_SS_DEFAULT_INPUT,$WS_BORDER))
GUICtrlSetFont(-1, 24, 800, 0, "MS Sans Serif")
$Button1 = GUICtrlCreateButton("清空", 8, 8, 75, 25)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
$Button2 = GUICtrlCreateButton("01234567890123456", 208, 16, 361, 65)
GUICtrlSetFont(-1, 24, 800, 0, "MS Sans Serif")
$Combo1 = GUICtrlCreateCombo("", 190, 232, 121, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "①扣除|①加上|①乘以|①除以", "①扣除") ; 在列表框中添加新的项目,并设置一个新的默认值
GUICtrlSetFont(-1, 24, 800, 0, "MS Sans Serif")
$Combo2 = GUICtrlCreateCombo("", 494, 232, 121, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "②扣除|②加上|②乘以|②除以", "②乘以") ; 在列表框中添加新的项目,并设置一个新的默认值
GUICtrlSetFont(-1, 24, 800, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

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

        EndSwitch
WEnd
发表于 2011-6-25 04:40:53 | 显示全部楼层
提问的话发错地方了
发表于 2011-6-25 11:42:15 | 显示全部楼层
楼主的帖子应该发到提问区!我帮你转移一下!
 楼主| 发表于 2011-6-25 15:11:06 | 显示全部楼层
谢谢,高手问帮忙一下
发表于 2011-6-25 21:38:40 | 显示全部楼层
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-21 04:29 , Processed in 0.090928 second(s), 21 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表