隐藏Tab的灰色背景,最好只留下切换按钮
本帖最后由 81206954 于 2009-12-26 19:25 编辑效果图:
需解决的问题: 隐藏Tab的灰色背景和白色背景,只留下切换按钮,#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <TabConstants.au3>
#Include <GuiComboBox.au3>
#include <GUIConstants.au3>
#include <GuiMenu.au3>
#include <Process.au3>
#include <File.au3>
#include <Array.au3>
#include <ProgressConstants.au3>
$Form = GUICreate("1111111111", 346, 333)
$tab = GUICtrlCreateTab(3, 18, 342, 145)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
$tab0 = GUICtrlCreateTabItem("333")
$Combo1 = GUICtrlCreateCombo("", 22, 75, 130, 25)
GUICtrlSetData(-1, "22|33","22")
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$Button1 = GUICtrlCreateButton("确定", 158, 75, 50, 23)
GUICtrlSetFont(-1, 9, 400, 0, "MS Sans Serif")
GUICtrlCreateTabItem("")
$tab1 = GUICtrlCreateTabItem("222")
$Group1 = GUICtrlCreateGroup("222", 10, 58, 326, 95)
GUICtrlSetFont(-1, 8, 400, 0, "MS Sans Serif")
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateTabItem("")
$Pic1 = GUICtrlCreatePic("bg.jpg", 0, 0,353, 364, $WS_CLIPSIBLINGS)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE, $Button1
Exit
EndSwitch
WEnd 那就不是TAB标签了,可以用按钮代替。无非就是GUIGetMsg、GUICtrlSetState。
我的GUI建出来就是这样的啊#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 489, 342, 192, 124)
GUISetBkColor(0x000000)
$Tab1 = GUICtrlCreateTab(62, 58, 357, 207)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
$TabSheet1 = GUICtrlCreateTabItem("TabSheet1")
$Label2 = GUICtrlCreateLabel("111111111", 110, 138, 58, 17)
$TabSheet2 = GUICtrlCreateTabItem("TabSheet2")
$Label3 = GUICtrlCreateLabel("22222", 154, 164, 34, 17)
$TabSheet3 = GUICtrlCreateTabItem("TabSheet3")
$TabSheet4 = GUICtrlCreateTabItem("TabSheet4")
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
本帖最后由 81206954 于 2009-12-26 18:07 编辑
还是不行~~~:face (18): 回复 4# 81206954 #include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("分页标签对话框", 413, 298, 302, 218)
GUISetIcon("D:\005.ico")
$PageControl1 = GUICtrlCreateTab(8, 8, 396, 256, $TCS_BUTTONS)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
$TabSheet1 = GUICtrlCreateTabItem("TabSheet1")
$Label3 = GUICtrlCreateLabel("111111111111", 96, 115, 76, 18)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$TabSheet2 = GUICtrlCreateTabItem("TabSheet2")
$Label2 = GUICtrlCreateLabel("222222222222", 64, 123, 76, 18)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$TabSheet3 = GUICtrlCreateTabItem("TabSheet3")
$Label1 = GUICtrlCreateLabel("33333333333333", 72, 131, 88, 18)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
GUICtrlCreateTabItem("")
$Button1 = GUICtrlCreateButton("确定(&O)", 166, 272, 75, 25, 0)
$Button2 = GUICtrlCreateButton("取消(&C)", 246, 272, 75, 25, 0)
$Button3 = GUICtrlCreateButton("帮助(&H)", 328, 272, 75, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
这是不是跟系统和系统主题有关啊
我的系统是WIN7,
你可以加个皮肤试试 本帖最后由 81206954 于 2009-12-26 19:45 编辑
:face (37): 用图片盖住Tab$WS_CLIPSIBLINGS ,隐藏了Tab,但是功能没影响,然后用图片代替按钮,勉强算OK了,嘿嘿~~~
看我的图:
kv998你这个方法也不错,但是不符合我说的,谢谢!收藏了:face (23): 看 看看
学习 用图片盖住Tab$WS_CLIPSIBLINGS ,隐藏了Tab,但是功能没影响,然后用图片代替按钮,勉强算O ...
81206954 发表于 2009-12-26 19:24 http://www.autoitx.com/images/common/back.gif
这个不错,试试行不行。本人也正为这个问题困扰 我是用皮肤的,呵呵
页:
[1]