找回密码
 加入
搜索
查看: 2162|回复: 2

[AU3基础] 在多个标签页上,隐藏IP 控件!~```[已解决]

[复制链接]
发表于 2011-10-16 09:03:31 | 显示全部楼层 |阅读模式
本帖最后由 wu5cheng3 于 2011-10-16 11:51 编辑
#include <EditConstants.au3> ;编辑框(Edit), 输入框(Input)
#include <StaticConstants.au3> ;标签(Label), 图片(Pic), 图标(Icon)
#include <WindowsConstants.au3> ;Gui 扩展样式
#include <Inet.au3> ;公网IP常量
#include <GuiComboBoxEx.au3>
#include <GuiImageList.au3>
#Include <GuiListView.au3>
#include <GUIConstantsEx.au3> ;GUI 创建, 事件
#include <Process.au3>
#include <ButtonConstants.au3>;按钮(Button)样
#Include <GuiStatusBar.au3>
#include <GUIConstants.au3>
#Include <Date.au3>
#include <ProgressConstants.au3>;进度条(Progress Bar)控件样式
#Include <File.au3>
#Include <GuiIPAddress.au3>

$bt = GUICreate("AUTOIT CN AutoIt中文论坛acnau3软件汉化 - 分享您的技术!",600,500)

$cd1 = GUICtrlCreateMenu("菜单1","-1","0")
$ht = GUICtrlCreateMenuItem("1",$cd1)

$cd2 = GUICtrlCreateMenu("菜单2","-1","1")
$jsq = GUICtrlCreateMenuItem("2",$cd2)

$cd3 = GUICtrlCreateMenu("菜单3","-1","2")
$jsb = GUICtrlCreateMenuItem("3",$cd3)


GUICtrlCreateGroup("分组控件1", 15, 410, 158, 60)
GUICtrlCreateGroup("分组控件2", 180, 410, 405, 60)
GUICtrlCreateLabel("静态标签控件1",55,435,100,16)
GUICtrlCreateLabel("静态标签控件2",350,435,100,16)


$bq1 = GUICtrlCreateTab(5, 135, 592, 270)
$bqykj1 = GUICtrlCreateTabItem("标签页1")

$bq2 = GUICtrlCreateTab(50, 135, 592, 270)
$bqykj2 = GUICtrlCreateTabItem("标签页2")

$bq3 = GUICtrlCreateTab(95, 135, 592, 270)
$bqykj3 = GUICtrlCreateTabItem("标签页3")

$bq4 = GUICtrlCreateTab(95, 135, 592, 270)
$bqykj4 = GUICtrlCreateTabItem("标签页4")

$bq5 = GUICtrlCreateTab(95, 135, 592, 270)
$bqykj5 = GUICtrlCreateTabItem("标签页5")

$bq6 = GUICtrlCreateTab(95, 135, 592, 270)
$bqykj6 = GUICtrlCreateTabItem("标签页6")

$bq7 = GUICtrlCreateTab(95, 135, 592, 270)
$bqykj7 = GUICtrlCreateTabItem("标签页7")

$IP = _GUICtrlIpAddress_Create($bt, 211, 184, 122, 18)
_GUICtrlIpAddress_Set($IP, "192.168.1.1")


;~ ControlHide("","",$IP)
;~ _GUICtrlIpAddress_ShowHide 


$bq8 = GUICtrlCreateTab(95, 135, 592, 270)
$bqykj8 = GUICtrlCreateTabItem("标签页8")



GUISetState()
While 1
        $msg = GUIGetMsg()
        Select
                Case $msg = $GUI_EVENT_CLOSE
                        Exit
        EndSelect
WEnd
IP控件只在 标签页7 显示    其他标签页不显示!~
发表于 2011-10-16 10:13:41 | 显示全部楼层
#include <GuiIPAddress.au3>

$hGui = GUICreate('TAB内显隐Ip控件 By Afan')
$tab = GUICtrlCreateTab(5, 5, 392, 370)
GUICtrlCreateTabItem('标签页 1')
GUICtrlCreateTabItem('标签页 2')
GUICtrlCreateTabItem('标签页 3')
GUICtrlCreateTabItem('标签页 4')
$IpShow = GUICtrlCreateTabItem('有IP页 5')
GUICtrlCreateTabItem('标签页 6')
GUICtrlCreateTabItem('')
$IP = _GUICtrlIpAddress_Create($hGui, 211, 184, 122, 18)
_GUICtrlIpAddress_Set($IP, '192.168.1.1')
_GUICtrlIpAddress_ShowHide($IP, @SW_HIDE)

GUISetState()
While 1
        Switch GUIGetMsg()
                Case -3
                        Exit
                Case $tab
                        Switch GUICtrlRead($tab)
                                Case $IpShow - 4
                                        _GUICtrlIpAddress_ShowHide($IP, @SW_SHOW)
                                Case Else
                                        _GUICtrlIpAddress_ShowHide($IP, @SW_HIDE)

                        EndSwitch
        EndSwitch
WEnd

评分

参与人数 1金钱 +10 收起 理由
wu5cheng3_bak + 10 谢谢帮忙

查看全部评分

 楼主| 发表于 2011-10-16 11:27:58 | 显示全部楼层
afan 发表于 2011-10-16 10:13



   

多谢A版的帮助,完美解决... ...
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-11-6 09:37 , Processed in 0.081613 second(s), 27 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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