Futurebasic/Language/Reference/def buttonhelpsettext

From Wikibooks, open books for an open world
< Futurebasic‎ | Language‎ | Reference
Jump to: navigation, search

DEF BUTTONHELPSETTEXT[edit]

DEF BUTTONHELPSETTEXT[edit]

Statement[edit]

✔ Appearance ✔ Standard ✔ Console

Syntax[edit]

DEF BUTTONHELPSETTEXT ( btnID%|& , helpMessage$ )

Revised[edit]

May, 2003 (Release 8)

Description[edit]

This routine associates the helpMessage$ string with the button specified by bntID.

Behavior for Carbon applications[edit]

Help tags are meant to replace help balloons in Carbon. They should provide concise and precise information about the action of the button located under the mouse pointer. Help tags are displayed automatically by the system when no event of a higher priority is pending and they disappear from the screen as soon as an input from the user must be handled.

Because Help tags are much more subtle than the outdated Help balloons their visibility status defaults to on. You can toggle the display of the Help tags with DEF BUTTONHELPSHOW(visibilityFlag).

The helpMessage$ string parameter may contain escape codes to setup the alignment of the help tag displayed on screen and the extra message that usually appears when the Command key is held down. The string might be formatted like so: "helpmessage[\§[+]additionalMessage][@alignmentCode]" where: indicates the ending of the first help message and the beginning of the second. Optionally, you can add the second message to the first using the + symbol. \@ alignmentCode indicates the position of the help tag relative to the button specified. You can use one of the following alignement codes (T, L, B, R and C) standing for top, left, bottom, right and center respectively:

T; L; B; R; LC(CL); RC(CR); TL; TR; LT; LB; BL; BR; RT; RB.

For example, the string below would display a help tag at the top of the button. Holding down the Command key would append A carriage return + more info.

message = "Close the demo\§+and I could have a rest\@T"

Behavior for PPC (starting with Mac OS 8.5)[edit]

PPC applications use the Help balloons mechanism to display the message associated with a given button. However, an extra step is required to make the balloon show up effectively on screen. When your dialog handler intercepts a cursor event, you must call DEF BUTTONHELPDISPLAY if the mouse is over a button located in the active window. If Help balloons are enabled at the system level then the help message is displayed. Note that the second help message is ignored in PPC.

You must include "Subs Help tags.Incl" in your project to make this command available to your program.

DEF BUTTONHELPSETTEXT (_quitBtn, "Shutdown the application")

See Also[edit]

DEF BUTTONHELPSHOW; DEF BUTTONHELPDISPLAY (PPC)