Carbon


Control Part Code Constants

Header: ControlDefinitions.h

enum {
    kControlLabelPart = 1,
    kControlMenuPart = 2,
    kControlTrianglePart = 4,
    kControlEditTextPart = 5,
    kControlPicturePart = 6,
    kControlIconPart = 7,
    kControlClockPart = 8,
    kControlListBoxPart = 24,
    kControlListBoxDoubleClickPart = 25,
    kControlImageWellPart = 26,
    kControlRadioGroupPart = 27,
    kControlButtonPart = 10,
    kControlCheckBoxPart = 11,
    kControlRadioButtonPart = 11,
    kControlUpButtonPart = 20,
    kControlDownButtonPart = 21,
    kControlPageUpPart = 22,
    kControlPageDownPart = 23,
    kControlClockHourDayPart = 9,
    kControlClockMinuteMonthPart = 10,
    kControlClockSecondYearPart = 11,
    kControlClockAMPMPart = 12,
    kControlDataBrowserPart = 24,
    kControlDataBrowserDraggedPart = 25
};

Constant descriptions

kControlLabelPart

Identifies the label of a pop-up menu control.

kControlMenuPart

Identifies the menu of a pop-up menu control. For bevel buttons with a menu attached, this part code specifies a menu item of the bevel button.

kControlTrianglePart

Identifies a disclosure triangle control.

kControlEditTextPart

Identifies an editable text control. Available with Appearance Manager 1.0 and later.

kControlPicturePart

Identifies a picture control. Available with Appearance Manager 1.0 and later.

kControlIconPart

Identifies an icon control. Available with Appearance Manager 1.0 and later.

kControlClockPart

Identifies a clock control. Available with Appearance Manager 1.0 and later.

kControlListBoxPart

Identifies a list box control. Available with Appearance Manager 1.0 and later.

kControlListBoxDoubleClickPart

Identifies a double-click in a list box control. Available with Appearance Manager 1.0 and later.

kControlImageWellPart

Identifies an image well control. Available with Appearance Manager 1.0 and later.

kControlRadioGroupPart

Identifies a radio group control. Available with Appearance Manager 1.0.2 and later.

kControlButtonPart

Identifies either a push button or bevel button control. For bevel buttons with a menu attached, this part code specifies the button but not the attached menu.

kControlCheckBoxPart

Identifies a checkbox control.

kControlRadioButtonPart

Identifies a radio button control.

kControlUpButtonPart

Identifies the up button of a scroll bar control (the arrow at the top or the left).

kControlDownButtonPart

Identifies the down button of a scroll bar control (the arrow at the right or the bottom).

kControlPageUpPart

Identifies the page-up part of a scroll bar control.

kControlPageDownPart

Identifies the page-down part of a scroll bar control.

kControlClockHourDayPart

Identifies the part of a clock control that contains the hour or the day. The Mac OS 8.5 Control Manager defines this new control part code constant.

kControlClockMinuteMonthPart

Identifies the part of a clock control that contains the minute or the month. The Mac OS 8.5 Control Manager defines this new control part code constant.

kControlClockSecondYearPart

Identifies the part of a clock control that contains the second or the year. The Mac OS 8.5 Control Manager defines this new control part code constant.

kControlClockAMPMPart

Identifies the part of a clock control that contains the AM/PM information. The Mac OS 8.5 Control Manager defines this new control part code constant.

kControlDataBrowserPart
kControlDataBrowserDraggedPart

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.


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