displayedMnemonicIndex

Deprecated

Set it in the component's style: style = { displayedMnemonicIndex(index) }

Sets which occurrence of the mnemonic letter in the text is underlined, as a zero-based index into the text; -1 underlines none of them. Use it when the letter appears more than once and the first one is not the one to decorate - displayedMnemonicIndex(5) underlines the A of Save As.

An unchanged declaration does not rewrite the index. After the text or mnemonic changes, the declared index is written back while the text reaches it, wherever the mnemonic appears in the modifier. Removing the declaration leaves the index the widget derives from its current text and mnemonic.

Throws when index is below -1 or beyond the end of the text, as Swing does. Where a later text no longer reaches it, the widget keeps the index it derives.

Return

this modifier with the underlined index declared on it.

Parameters

index

the zero-based index into the text of the character to underline, or -1 to underline none of them.

See also