Home
The HyperCard Center
HyperTalk Reference
Home » HyperTalk Reference » markChar

Note: This is a work in progress and many formatting issues have been fixed. Read more about the project on the home page.

markChar

set [the] markChar of menuItem of menu to char

The markChar property returns or sets the character used to mark a menu item. If the item has no mark, the markChar returns empty. Otherwise, it returns the character.

Setting the markChar of a menu item to a character also marks the item, that is, sets its checkMark property to true.

The default character used to mark menu items is the check mark, a character equal to numToChar(18). It prints in the Chicago font:

Examples

-- numToChar(19) produces a diamond character in Chicago:
set the markChar of menuItem "New" of menu "File" to numToChar(19)
set the markChar of menuItem 2 of menu 2 to numToChar(19)
set the markChar of second menuItem of second menu to numToChar(19)

Demo Script

on mouseUp
if there is a menu "Reference"
then set the markChar of menuItem 1 of menu "Reference" to ¬
numToChar(240) -- the Apple symbol in Chicago and some other fonts
end mouseUp

Related Topics

Placeholders

menuItem

An expression that evaluates to one of the following:

menuItem text
menuItem posInteger
ordinal menuItem

For example:

menuItem "New"
menuItem 2
second menuItem

menu

An expression that evaluates to one of the following:

menu text
menu posInteger
ordinal menu

For example:

menu "File"
menu 2
second menu

char

An expression that yields a single character.

For example:

"a"
return
tab
numToChar(13)

HyperTalk Reference

Version 0.8b4 (July 4, 2025)

Made with Macintosh

Switch to Retro View