wu5cheng3_bak 发表于 2011-10-16 09:03:31

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

本帖最后由 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
WEndIP控件只在 标签页7 显示    其他标签页不显示!~

afan 发表于 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

wu5cheng3_bak 发表于 2011-10-16 11:27:58


afan 发表于 2011-10-16 10:13 http://www.autoitx.com/images/common/back.gif


   

多谢A版的帮助,完美解决... ...
页: [1]
查看完整版本: 在多个标签页上,隐藏IP 控件!~```[已解决]