CyberSlug Posted April 8, 2005 Share Posted April 8, 2005 I think this was mentioned this before, but anyway: When a tabitem is clicked, the notification ID is for the main tab control itself. Additionally, GuiCtrlRead on the tab returns the tabitem INDEX instead of the tabitem ID..... I think the direct tabitem ID would be more useful... #include <GuiConstants.au3> GuiCreate("Example") $tab = GuiCtrlCreateTab(80, 80, 300, 200) $t1 = GuiCtrlCreateTabItem("one") GuiCtrlCreateButton("example button", 200, 200) $t2 = GuiCtrlCreateTabItem("two") $t3 = GuiCtrlCreateTabItem("three") GuiCtrlCreateTabItem('') GuiCtrlCreateLabel("TabItem ID's: " & $t1 & ", " & $t2 & ", " & $t3, 10, 10) GuiSetState() While 1 $msg = GUIGetMsg() ToolTip($msg, 0, 0) If $msg = $GUI_EVENT_CLOSE Then Exit If $msg = $tab Then MsgBox(4096,"Tab clicked", "Tad index is " & GuiCtrlRead($tab)) EndIf WEnd Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
jpm Posted April 8, 2005 Share Posted April 8, 2005 Presently the correspondance between index and id is not done due to the fact that if a tabitem is deleted a renumbering occurs. I left to the programmer the responsability to do that. I agree it can be a good idea if not too costly. Link to comment Share on other sites More sharing options...
redndahead Posted April 8, 2005 Share Posted April 8, 2005 I had a use for it to notify the other day, but I worked around it. I think it would have made it alot easier though if it did notify. red Link to comment Share on other sites More sharing options...
jpm Posted April 10, 2005 Share Posted April 10, 2005 Found the idea use OPT("GUIEventCompatibilityMode",2) and 3.1.1.4 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now