ToolTip control help

Function help:

Real API_Tooltip_Create (Real Parent Handle Type, Real Parent Handle, Real Style Flags,String Text);

This function creates a new tooltip control.

Argument list:
(0) Parent Handle Type: 0 = A Control ID, 1 = A window handle
(1) Parent Handle: The handle to the parent control or window
(2) Style Flags: Supports the following style flags:

TTS_ALWAYSTIP
Indicates that the ToolTip control appears when the cursor is on a tool, even if the ToolTip control's owner window is inactive. Without this style, the ToolTip appears only when the tool's owner window is active.

TTS_BALLOON
Indicates that the ToolTip control has the appearance of a cartoon "balloon," with rounded corners and a stem pointing to the item.

TTS_NOANIMATE
Disables sliding ToolTip animation on Microsoft Windows 98 and Windows 2000 systems. This style is ignored on earlier systems.

TTS_NOFADE
Disables fading ToolTip animation on Windows 2000 systems. This style is ignored on earlier Microsoft Windows NT systems, and on Windows 95 and Windows 98.

TTS_NOPREFIX
Prevents the system from stripping the ampersand character from a string. Without this style, the system automatically strips ampersand characters. This allows an application to use the same string as both a menu item and as text in a ToolTip control.

TTS_CLOSE
Displays a Close button on the tooltip.

Return value:
If this function succeeds, it returns the Control ID of the control, otherwise it returns 0.


Real API_Tooltip_SetBkColor (Real Control ID, Real Color);

This function changes the background color of a tooltip control.

Return value:
No return value.


Real API_Tooltip_SetTextColor (Real Control ID, Real Color);

This function changes the text color of a tooltip control.

Return value:
No return value.


Real API_Tooltip_GetBkColor (Real Control ID);

This function returns the background color of a tooltip control.

Return value:
Returns the background color.


Real API_Tooltip_GetBkColor (Real Control ID);

This function returns the background color of a tooltip control.

Return value:
Returns the background color.


Real API_Tooltip_GetTextColor (Real Control ID);

This function returns the text color of a tooltip control.

Return value:
No return value.


Real API_Tooltip_SetTitle (Real Control ID, Real Icon Handle, String Text);

This function adds a title with an optional icon on top of the tooltip control.

The Icon Handle (argument1) can be an icon resource handle, see API_Resource_LoadIcon, or one of the following default icons:

TTI_NONE
No icon.
TTI_INFO
Info icon.
TTI_WARNING
Warning icon
TTI_ERROR
Error Icon

Return value:
Returns true (1) if successful, or false (0) otherwise.


Real API_Tooltip_SetDelayTime (Real Control ID, Real Time Type, Real Time In Miliseconds);

This function changes the delay of the specified event in a tooltip.

The Time Types (argument1):

0
Set the amount of time a ToolTip window remains visible if the pointer is stationary within a tool's bounding rectangle. To return the autopop delay time to its default value, set argument2 to -1.

1
Set the amount of time a pointer must remain stationary within a tool's bounding rectangle before the ToolTip window appears. To return the initial delay time to its default value, set argument2 to -1.

2
Set the amount of time it takes for subsequent ToolTip windows to appear as the pointer moves from one tool to another. To return the reshow delay time to its default value, set argument2 to -1.

3
Set all three delay times to default proportions. The autopop time will be ten times the initial time and the reshow time will be one fifth the initial time. If this flag is set, use a positive value of argument2 to specify the initial time, in milliseconds. Set argument2 to a negative value to return all three delay times to their default values.

Return value:
No return value.


No secondary check commands.

Example code:

is
Tooltip1 = API_Tooltip_Create (0,Static1,TTS_ALWAYSTIP,"This is Static1.");

API_Tooltip_SetTitle (Tooltip1,TTI_INFO,"Control Information");
API_Tooltip_SetDelayTime (Tooltip1,1,100);

Return to help index