Jump to content

SW_DISABLE


Recommended Posts

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)

NEWHeader1.png

Link to comment
Share on other sites

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)

<{POST_SNAPBACK}>

Doc say

GUISetState ( [flag [, winhandle]] )

so I don't understand the computation $tab1+$tab2+$tab3+$tab4+$tab5+$tab7 which does not correspand to any winhandle :lmao:
Link to comment
Share on other sites

Doc say

so I don't understand the computation $tab1+$tab2+$tab3+$tab4+$tab5+$tab7 which does not correspand to any winhandle :lmao:

<{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
Wend

i believe this follows the rule

GUISetState ( [flag [, winhandle]] )

EDIT

this didn't work either

GUICtrlSetState($tab1+$tab2+$tab3+$tab4+$tab5+$tab7,$GUI_DISABLE)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

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!
Link to comment
Share on other sites

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 league

guess i better leave this one alone... thanks again

NEWHeader1.png

Link to comment
Share on other sites

@jpm:  Can individual tabitems be disabled??? Relevant Win32 API: [

<{POST_SNAPBACK}>

The answer is no only highlighted or buttonpushed :)

Tab Control Item States

Tab 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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...