Carbon


Control State Part Code Constants

Header: Controls.h

enum {
    kControlNoPart = 0,
    kControlIndicatorPart = 129,
    kControlDisabledPart = 254,
    kControlInactivePart = 255
};

Constant descriptions

kControlNoPart

Identifies no specific control part. This value unhighlights any highlighted part of the control when passed to the HiliteControl function. For events in bevel buttons with an attached menu, this part code indicates that either the mouse was released outside the bevel button and menu or that the button was disabled.

kControlIndicatorPart

Identifies the scroll box of a scroll bar control.

kControlDisabledPart

Used with HiliteControlto disable the control.

kControlInactivePart

Used with HiliteControl to make the control inactive.

Constants of type ControlPartCode identify specific parts of controls.

Part codes are meaningful only within the scope of a single control definition function. For example, the standard tab control uses part codes 1...N, where N is the number of tabs, even though those numbers do collide with part codes defined for use with other control definition functions. Therefore, when you wish to specify part codes for the tab control for use with the function SetControlData, for example, you should use a part code corresponding to a 1-based index of the tab whose data you wish to set. In other words, the first tab is part code 1, the second tab is part code 2, and so on.

Note that if you wish to create part codes for a custom control definition function, you may assign values anywhere within the ranges 1–128 and 130–253. Note also that the function FindControl does not typically return the kControlDisabledPart or kControlInactivePart part codes and never returns them with standard controls.


© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)