Valuater Posted March 8, 2005 Posted March 8, 2005 When i put this code GUISetState(@SW_DISABLE,$tab1+$tab2+$tab3+$tab4+$tab5+$tab7) it also disables $tab6 i want to lockp-up all other tabs, and utilize the buttons on $tab6 until completed any ideas, thanks (newby, probably some easy answer for this one)
jpm Posted March 8, 2005 Posted March 8, 2005 When i put this codeGUISetState(@SW_DISABLE,$tab1+$tab2+$tab3+$tab4+$tab5+$tab7)it also disables $tab6i want to lockp-up all other tabs, and utilize the buttons on $tab6 until completedany ideas, thanks(newby, probably some easy answer for this one)<{POST_SNAPBACK}>Doc sayGUISetState ( [flag [, winhandle]] )so I don't understand the computation $tab1+$tab2+$tab3+$tab4+$tab5+$tab7 which does not correspand to any winhandle
Valuater Posted March 8, 2005 Author Posted March 8, 2005 (edited) Doc sayso I don't understand the computation $tab1+$tab2+$tab3+$tab4+$tab5+$tab7 which does not correspand to any winhandle <{POST_SNAPBACK}>Thanks, for your reply, here is an example#include <GUIConstants.au3> GUICreate("My GUI") $tab=GUICtrlCreateTab (9,8,492,345, $TCS_MULTILINE+$TCS_RIGHTJUSTIFY);create tab $tab1=GUICtrlCreateTabitem ( "Tab 1") $tab2=GUICtrlCreateTabitem ( "Tab 2") $tab3=GUICtrlCreateTabitem ( "Tab 3") $tab4=GUICtrlCreateTabitem ( "Tab 4") $tab5=GUICtrlCreateTabitem ( "Tab 5") $tab6=GUICtrlCreateTabitem ( "Tab 6") $tab7=GUICtrlCreateTabitem ( "Tab 7") GUISetState(@SW_SHOW) ;GUISetState(@SW_DISABLE,$tab1+$tab2+$tab3+$tab4+$tab5+$tab7);.......... here is the problem (remove 1st ";") ;Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wendi believe this follows the ruleGUISetState ( [flag [, winhandle]] )EDITthis didn't work eitherGUICtrlSetState($tab1+$tab2+$tab3+$tab4+$tab5+$tab7,$GUI_DISABLE) Edited March 8, 2005 by Valuater
Valuater Posted March 8, 2005 Author Posted March 8, 2005 these don't work either GUICtrlSetState($tab1 & $tab2 & $tab3 & $tab4 & $tab5 & $tab7,$GUI_DISABLE) or GUICtrlSetState($tab6,$GUI_FOCUS) i just can't figure it out
CyberSlug Posted March 8, 2005 Posted March 8, 2005 Proper syntax--but it still does not work: GuiCtrlSetState($tab1, $GUI_DISABLE) ; ... must specify each one individually unless you use an array... GuiCtrlSetState($tab7, $GUI_DISABLE) @jpm: Can individual tabitems be disabled??? Relevant Win32 API: TCM_SETITEM wParam = (WPARAM) (int) iItem; // index of the item lParam = (LPARAM) (TC_ITEM FAR *) pitem; // pointer to struct containing item attributes // Corresponding macro BOOL TabCtrl_SetItem(HWND hwnd, int iItem, TC_ITEM FAR* pitem); The TCM_SETITEM message sets some or all of a tab's attributes. You can send this message explicitly or by using the TabCtrl_SetItem macro. typedef struct _TC_ITEM { UINT mask; // value specifying which members to retrieve or set UINT lpReserved1; // reserved; do not use UINT lpReserved2; // reserved; do not use LPSTR pszText; // pointer to string containing tab text int cchTextMax; // size of buffer pointed to by the pszText member int iImage; // index to tab control's image LPARAM lParam; // application-defined data associated with tab } TC_ITEM; The TC_ITEM structure specifies or receives the attributes of a tab. Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Valuater Posted March 8, 2005 Author Posted March 8, 2005 Proper syntax--but it still does not work:GuiCtrlSetState($tab1, $GUI_DISABLE); ... must specify each one individually unless you use an array...GuiCtrlSetState($tab7, $GUI_DISABLE)@jpm: Can individual tabitems be disabled??? Relevant Win32 API: TCM_SETITEM wParam = (WPARAM) (int) iItem; // index of the item lParam = (LPARAM) (TC_ITEM FAR *) pitem; // pointer to struct containing item attributes // Corresponding macro BOOL TabCtrl_SetItem(HWND hwnd, int iItem, TC_ITEM FAR* pitem); The TCM_SETITEM message sets some or all of a tab's attributes. You can send this message explicitly or by using the TabCtrl_SetItem macro. typedef struct _TC_ITEM { UINT mask; // value specifying which members to retrieve or set UINT lpReserved1; // reserved; do not use UINT lpReserved2; // reserved; do not use LPSTR pszText; // pointer to string containing tab text int cchTextMax; // size of buffer pointed to by the pszText member int iImage; // index to tab control's image LPARAM lParam; // application-defined data associated with tab } TC_ITEM; The TC_ITEM structure specifies or receives the attributes of a tab.<{POST_SNAPBACK}>thanks Cyber,but way.... out of my leagueguess i better leave this one alone... thanks again
jpm Posted March 13, 2005 Posted March 13, 2005 @jpm: Can individual tabitems be disabled??? Relevant Win32 API: [<{POST_SNAPBACK}>The answer is no only highlighted or buttonpushed Tab Control Item StatesTab control items now support an item state to support the TCM_DESELECTALL message. Additionally, the TCITEM structure supports item state values. Value Description TCIS_BUTTONPRESSED Version 4.70. The tab control item is selected. This state is only meaningful if the TCS_BUTTONS style flag has been set. TCIS_HIGHLIGHTED Version 4.71. The tab control item is highlighted, and the tab and text are drawn using the current highlight color. When using high-color, this will be a true interpolation, not a dithered color.
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