|
Tooltips |
Top Previous Next |
When you hover your mouse over event handlers, object properties and methods, constants, procedures, and variables the TIDE displays tooltips. These look like this:

The tooltips are displayed when hovering over constructs in the code editor, the Project Browser, Watch, and the Stack pane. They show a formal construct definition and a comment, if available.
|
In the code editor, you may also display a tooltip with the keyboard by pressing Ctrl+T when the cursor is within an event handler, a procedure, a constant or a global variable.
|
Tooltip text for properties, methods, and events comes from the platform file for the platform selected in your project. You can add your own custom comments to the tooltips displayed for procedures and variables of your projects. What's more, you can use HTML formatting to make these comments look more readable! Here is an example:
function blink(num as integer) as boolean ' Blinks the lights. Input:<br><b>num</b>- pattern # to "play". <b><font color=red> Do not set to 0.</font>.
'... your code here ...
End Function
|
This would yield the following tooltip when hovering over the "blink" identifier (notice how HTML formatting improves tooltip readability):

Supported HTML Tags section details which tags you can use to beautify your tooptips.
Your comment must be on the same line as the function definition, or immediately following it. The comment can contain multiple lines, if every line begins with a comment character. These lines must be consecutive -- with no blank lines in between. For example:
function blink(num as integer) as boolean ' USER-DEFINED. Blinks the lights. ' This is a very important function.
' And must be included in every application.
'... your code here ...
End Function
|
This would yield a tooltip with the text "USER DEFINED. Blinks the lights. This is a very important function." This would be as one paragraph -- line breaks are not displayed within the tooltip, unless you use <br> element. The third comment would not be included because it is preceded by a blank line.
As we will explain in the Introduction to Procedures, there is a procedure definition (procedure body) and procedure declaration that merely states that the procedure exists. If both have comments than the comment in the procedure definition wins (takes precedence) over the comment in the procedure declaration.
Variables also have declaration (declare statement) and definition (dim statement). Comment in the definition wins.
Finally, your own comment placed in the event handler definition takes over the comment for this event that comes from the platform file.