Jump to content
Sign in to follow this  
HansH

Tabitem can't be disabled

Recommended Posts

HansH

Anybody knows if it is possible to disable a tabitem

Currently it does not work, example:

#include <GUIConstants.au3>

$h_Gui = GuiCreate("tabtest", 704, 488, 490,360 ,BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

; --- Tab ---
$tab=GUICtrlCreateTab (2,2, 700,440)
$tab_conn=GUICtrlCreateTabitem ("TAB 1")
GUICtrlCreateLabel("label 1",200,100)

$tab_schema=GUICtrlCreateTabitem ("TAB 2")
GUICtrlSetState($tab_schema,$GUI_DISABLE)
GUICtrlCreateLabel("label 2",200,100)

$tab_query=GUICtrlCreateTabitem ("TAB 3")
GUICtrlSetState($tab_query,$GUI_DISABLE)

GUICtrlCreateLabel("label 3",200,100)

GUICtrlCreateTabitem (""); end of Tab control

GUISetState (@SW_SHOW,$h_Gui)               

While 1
    $msg = GUIGetMsg()
    if $msg = $GUI_EVENT_CLOSE Then  ExitLoop
WEnd
Exit

You still can move between tabs, although they are disabled.

Perhaps it is not supported ?

Hans

Share this post


Link to post
Share on other sites
Sokko

Truth be told, I don't think I've ever seen a disabled tab in any Windows application. Perhaps the OS doesn't support such a thing. Apparently it's not possible to use $GUI_HIDE on them either (I just tried). Very strange.

Share this post


Link to post
Share on other sites
Dickb

Unfortunately, it's not possible. :whistle:

This is what Microsoft MSDN says:

You cannot disable an individual tab. However, you can disable a tab control in a property sheet by disabling the corresponding page.

Share this post


Link to post
Share on other sites
HansH

Ok, than I don't spent any time trying.

Thanks for the answers

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×