Fire Posted January 1, 2010 Share Posted January 1, 2010 (edited) Hi to all.Dears i create sample GUI script with tabitems.My target is : on switch from tabitem1 to tabitem2 and display msgbox.(see below script it`s sample)So, i cant figure it out.Pliz anybody know another way to do somethink like what i want to do? or is here another way to do it?Sample here is:#include <GUIConstants.au3> #include <TabConstants.au3> $Form2 = GUICreate("Sample", 455, 322, 334, 141) $Tab1 = GUICtrlCreateTab(8, 0, 433, 21) $tabitem1=GUICtrlCreateTabItem("Windows GPO ") $tabitem2=GUICtrlCreateTabItem("Starup Editor") GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Switch $msg case $GUI_EVENT_CLOSE ExitLoop case $tabitem1 MsgBox(0,"TABITEM 1 SELECTED","TABITEM 1 SELECTED") case $tabitem2 MsgBox(0,"TABITEM 2 SELECTED","TABITEM 2 sELECTED") EndSwitch WEndAny tips will greatly appreciated.Thanks very much & Mery Christmas to all AutoIt International Community:) Edited January 1, 2010 by Sh3llC043r [size="5"] [/size] Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted January 1, 2010 Share Posted January 1, 2010 (edited) Like this? #include <GUIConstants.au3> $Form2 = GUICreate("Sample", 455, 322, 334, 141) $Tab1 = GUICtrlCreateTab(8, 0, 433, 21) $tabitem1 = GUICtrlCreateTabItem("Windows GPO ") $tabitem2 = GUICtrlCreateTabItem("Starup Editor") GUISetState() While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE ExitLoop Case $Tab1 Switch GUICtrlRead($Tab1) Case 0 MsgBox(0,"TABITEM 1 SELECTED","TABITEM 1 SELECTED") Case 1 MsgBox(0,"TABITEM 2 SELECTED","TABITEM 2 SELECTED") EndSwitch EndSwitch WEnd Edit: Also please try the helpfile next time you have a question, this is exactly what the example for GUICtrlCreateTabItem() does. Edited January 1, 2010 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Fire Posted January 1, 2010 Author Share Posted January 1, 2010 (edited) Thanks bro AdmiralAlkexYes your sample is that what i want to do.Thank you very much.Now i understand DAO of Tabitems.Thanks Again.Edit: Also please try the helpfile next time you have a question, this is exactly what the example for GUICtrlCreateTabItem() does.I`m Really sorry for this isuse:) May be i was drink so much .Thanks . Edited January 1, 2010 by Sh3llC043r [size="5"] [/size] 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