Home THE HYPERCARD CENTER

HyperTalk Reference
Home » HyperTalk Reference » Properties

Note: This is a work in progress and will be formatting errors. 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: 


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

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)


Related Topics

« longWindowTitles | HyperTalk Reference | marked »


Version 0.7b1 (March 24, 2022)

Made with Macintosh

Switch to Modern View

Home
The HyperCard Center
HyperTalk Reference
Home » HyperTalk Reference » Properties

Note: This is a work in progress and will be formatting errors. 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: 


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

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)


Related Topics

« longWindowTitles | HyperTalk Reference | marked »

Version 0.7b1 (March 24, 2022)

Made with Macintosh

Switch to Retro View