Important: The information in this document is obsolete and should not be used for new development.
PATH![]() |
![]() ![]() |
Constants of type ControlPartCode
identify specific parts of controls for functions such as SetControlData
, GetControlData
, and FindControlUnderMouse
. The ControlPartCode
constants are changed with the Appearance Manager to support new control part codes.
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.
enum {
kControlNoPart = 0,
kControlLabelPart = 1,
kControlMenuPart = 2,
kControlTrianglePart = 4,
kControlEditTextPart = 5,
kControlPicturePart = 6,
kControlIconPart = 7,
kControlClockPart = 8,
kControlButtonPart = 10,
kControlCheckBoxPart = 11,
kControlRadioButtonPart = 12,
kControlUpButtonPart = 20,
kControlDownButtonPart = 21,
kControlPageUpPart = 22,
kControlPageDownPart = 23,
kControlListBoxPart = 24,
kControlListBoxDoubleClickPart = 25,
kControlImageWellPart = 26,
kControlRadioGroupPart = 27,
kControlIndicatorPart = 129,
kControlDisabledPart = 254,
kControlInactivePart = 255
};
typedef SInt16 ControlPartCode;
kControlNoPart
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.kControlLabelPart
kControlMenuPart
kControlTrianglePart
kControlEditTextPart
kControlPicturePart
kControlIconPart
kControlClockPart
kControlButtonPart
kControlCheckBoxPart
kControlRadioButtonPart
kControlUpButtonPart
kControlDownButtonPart
kControlPageUpPart
kControlPageDownPart
kControlListBoxPart
kControlListBoxDoubleClickPart
kControlImageWellPart
kControlIndicatorPart
kControlDisabledPart
HiliteControl
to disable the control.kControlInactivePart
HiliteControl
to make the control inactive.