Futurebasic/Language/Reference/def checkoneitem

From Wikibooks, open books for an open world
Jump to navigation Jump to search

DEF CHECKONEITEM Statement[edit | edit source]

DEF CHECKONEITEM[edit | edit source]

Statement[edit | edit source]

✔ Appearance ✔ Standard ✔ Console

Syntax[edit | edit source]

DEF CHECKONEITEM(menuID%, itemID%)

Description[edit | edit source]

Places a checkmark next to the specified item in the specified menu, and unchecks all other items in that menu. The menu ID number is assigned by the MENU statement, or by a Toolbox routine that creates the menu, or by the resource that defines the menu. The item ID corresponds to the item's position in the menu (the item just under the menu title is item #1). Note that gray "dividing lines" in menus are also counted as menu items.

Use an itemID% value of zero to uncheck all items in the menu.

Example[edit | edit source]

image res/cd.gif CD Example: DEF CHECKONEITEM.BAS

Note[edit | edit source]

Do not set itemID% to a menu item which has a hierarchical submenu attached to it.

See Also[edit | edit source]

MENU statement; SETITEMMARK Toolbox routine: http://developer.apple.com/documentation/mac/Toolbox/Toolbox-157.html