Jump to content

GUICtrlDelete and tabs

Recommended Posts

  • 2 weeks later...

GUICtrlDelete doesn't work tabs.

It would be nice if you could make it possible.

Currently I'm using GUISendMsg and that works well, but I prefer GUICtrlDelete.

GUISendMsg($MainTabs, $TCM_DELETEITEM, $TabNum, 0)


slim, i've encountered this problem myself. glad you have a solution, but do you have the value for $TCM_DELETEITEM ? (I can't seem to connect to MSDN to search) Thanks
Link to post
Share on other sites

Did you know they fixed it in the latest unstable?

You can delete a tab by passing the tabitem variable to GUICtrlDelete.

Here's an example that works with the latest unstable:

#include <GUIConstants.au3>
AutoItSetOption("TrayIconDebug", 1)

;Initialize variables
Global $style1
Global $IniFile
Global $GUIWidth
Global $GUIHeight

$GUIWidth = 250
$GUIHeight = 250
$IniFile = StringTrimRight(@ScriptFullPath, 3) & "ini"

GUICreate("New GUI", $GUIWidth, $GUIHeight)

$MainTabs = GUICtrlCreateTab(10, 10, 225, 175)
   $TabItem1 = GUICtrlCreateTabItem("Tab 1")
   $TabItem2 = GUICtrlCreateTabItem("Tab 2")
   $TabItem3 = GUICtrlCreateTabItem("Tab 3")
   $TabItem4 = GUICtrlCreateTabItem("Tab 4")
   $TabItem5 = GUICtrlCreateTabItem("Tab 5")

$Button_1 = GUICtrlCreateButton("OK", 50, 200, 70, 20)


While 1
   $msg = GUIGetMsg()
      Case $msg = $GUI_EVENT_CLOSE

      Case $msg = $Button_1


Edited by SlimShady
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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...