重叠控件之间如何自由切换?就类似TAB那样子?
#include <GUIConstantsEx.au3>#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 623, 449, 192, 114)
$ListView1 = GUICtrlCreateListView("111111111", 160, 88, 250, 150)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 50)
$ListView2 = GUICtrlCreateListView("22222222222222222222", 160, 88, 250, 150)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 50)
$ListView3 = GUICtrlCreateListView("333333333333", 160, 88, 250, 150)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 50)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd LZ自己已经回答了这个问题,其实可以创建一个看不见的TAB控件!
也许LZ要问,看不见的TAB控件如何点击换页呢? 可以用GUICtrlSendMsg。 问题是如何隐藏?#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 623, 449, 192, 114)
$Tab1 = GUICtrlCreateTab(56, 72, 401, 257)
$TabSheet1 = GUICtrlCreateTabItem("TabSheet1")
$ListView1 = GUICtrlCreateListView("111111", 80, 112, 250, 150)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 50)
$TabSheet2 = GUICtrlCreateTabItem("TabSheet2")
$ListView2 = GUICtrlCreateListView("22222", 120, 128, 250, 150)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 50)
$TabSheet3 = GUICtrlCreateTabItem("TabSheet3")
$ListView3 = GUICtrlCreateListView("333333", 112, 144, 250, 150)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 50)
$TabSheet4 = GUICtrlCreateTabItem("TabSheet4")
$ListView4 = GUICtrlCreateListView("44444", 88, 136, 250, 150)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 50)
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
GUICtrlSetState($TabSheet3,$GUI_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
- -#用控件挡住倒是可以,但是感觉很山寨
没解决办法估计只能换方法了 创建一个看不见的TAB控件!
页:
[1]