找回密码
 加入
搜索
查看: 2057|回复: 4

LabeL控件和PIC控件叠放的问题。

[复制链接]
发表于 2009-6-29 23:28:49 | 显示全部楼层 |阅读模式
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 449, 192, 124)
;$Pic1 = GUICtrlCreatePic("F:\AutoFile\about.jpg", 8, 8, 617, 393, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))


        $www = GUICtrlCreateLabel ("网址:www.autoitscript.com/forum/",59,190,140,15)
        GuiCtrlSetFont($www, 8.5, -1, 4) ; underlined
        GuiCtrlSetColor($www,0x0000ff)
        GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
        GuiCtrlSetCursor($www,0)
        GUICtrlSetOnEvent(-1, "OnWWW")

GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

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

        EndSwitch
WEnd
Func OnWWW()
        Run(@ComSpec & " /c " & 'start http://www.autoitscript.com/forum/', "", @SW_HIDE)
EndFunc
         
本来想做一个关于窗口,窗口设计为图片底图,LABEL空间在图片上面,文字有网址链接,可单击后跳转到主页。
      现在的问题是,如果LABEL控件放在图片上,就无法单击跳转到指定的主页。
     去掉图片控件 就可以使用;奇怪了。

请朋友帮帮忙看看。。谢谢。
发表于 2009-6-30 00:03:16 | 显示全部楼层
#include <GUIConstantsEx.au3>

#include <StaticConstants.au3>

#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=

$Form1 = GUICreate("Form1", 633, 449, 192, 124)







        $www = GUICtrlCreateLabel ("网址:www.autoitscript.com/forum/",59,190,140,15)

        GuiCtrlSetFont($www, 8.5, -1, 4) ; underlined

        GuiCtrlSetColor($www,0x0000ff)

        GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)

        GuiCtrlSetCursor($www,0)

        GUICtrlSetOnEvent(-1, "OnWWW")
$Pic1 = GUICtrlCreatePic("F:\AutoFile\about.jpg", 8, 8, 617, 393, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))


GUISetState(@SW_SHOW)

#EndRegion ### END Koda GUI section ###



While 1

        $nMsg = GUIGetMsg()

        Switch $nMsg

                Case $GUI_EVENT_CLOSE

                        Exit



        EndSwitch

WEnd

Func OnWWW()

        Run(@ComSpec & " /c " & 'start http://www.autoitscript.com/forum/', "", @SW_HIDE)

EndFunc
 楼主| 发表于 2009-6-30 09:06:55 | 显示全部楼层
太感谢 jhun帮忙了。 这个问题已经解决了。

不过出了个新的问题, 将图片控件移动到下面,原来标签的背景透明效果就没有了。现在标签都有背景色了。

还请在此指教。。谢谢了。。。
发表于 2009-6-30 13:11:57 | 显示全部楼层
这个就不好办了,你看能否找到合适的图片,就是文字区域下面是纯色的,然后把标签的背景色设置成图片一样的颜色
 楼主| 发表于 2009-6-30 14:17:40 | 显示全部楼层
呵呵。目前看来也只能这样了。 谢谢你。。。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-9-23 01:26 , Processed in 0.079958 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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