08-02-2010 02:29 AM
Hello all,
I have problems to show ToolTips for two controls in following example:
int InitMainPanel(void)
{
int toolTips;
int iStatus;
GetScreenSize (&giHeight, &giWidth);
giPanelHandle = LoadPanel (0, "NC_TRE_Control_Panel.uir", MAIN_PANEL); // Build tabbed Panel
SetPanelSize (giPanelHandle, giHeight*0.9, giWidth);
giTabCtrl = EasyTab_ConvertFromCanvas( giPanelHandle, MAIN_PANEL_CANVAS);
// SetPanelSize (giPanelTRX, giHeight * 0.8, giWidth * 0.85);
giPanelTRX = LoadPanel (giPanelHandle, "TRX.uir", TRX);
// SetPanelSize (giPanelTRX, giHeight * 0.8, giWidth * 0.85);
SetPanelSize (giPanelTRX, giHeight * 0.65, giWidth * 0.75);
toolTips = TT_NewToolTipInfo (giPanelTRX);
iStatus=TT_AttachControlTip (toolTips, TRX_BIAS_SENSE1, "Bias of driver and peaking", -30, -25);
iStatus=TT_AttachControlTip (toolTips, TRX_BIAS_SENSE2, "Bias of main transistor", -20, 30);
ErrorCheck(TT_SetInfoAttribute (toolTips, TTATTR_TEXT_FONT, VAL_APP_FONT));
ErrorCheck(TT_SetInfoAttribute (toolTips, TTATTR_TEXT_COLOR, VAL_RED));
ErrorCheck(TT_SetInfoAttribute (toolTips, TTATTR_TEXT_BGCOLOR, VAL_WHITE));
ErrorCheck(TT_SetInfoAttribute (toolTips, TTATTR_TEXT_POINT_SIZE, 15));
TT_EnableToolTips (toolTips);
giPanelTerminal = LoadPanel (giPanelHandle, "terminal.uir", TERM);
// EasyTab_SetBounds ( giPanelTerminal, giTabCtrl, VAL_EASY_TAB_EXTERIOR_BOUNDS, MakeRect (21, 0, 727, 910));
// SetPanelSize (giPanelTerminal, giHeight * 0.8, giWidth * 0.85);
SetPanelSize (giPanelTerminal, giHeight * 0.65, giWidth * 0.75);
giPanelRX = LoadPanel (giPanelHandle, "RX.uir", RX);
// SetPanelSize (giPanelRX, giHeight * 0.8, giWidth * 0.85);
SetPanelSize (giPanelRX, giHeight * 0.65, giWidth * 0.75);
giPanelREG = LoadPanel (giPanelHandle, "Register.uir", REGISTER);
// SetPanelSize (giPanelREG, giHeight * 0.8, giWidth * 0.85);
SetPanelSize (giPanelREG, giHeight * 0.65, giWidth * 0.75);
EasyTab_AddPanels (giPanelHandle, giTabCtrl, 1, giPanelTRX, giPanelRX, giPanelREG, giPanelTerminal, 0);
EasyTab_SetTabAttribute(giPanelHandle, giTabCtrl, giPanelTerminal, ATTR_EASY_TAB_TAB_COLOR, 0x00e4e4e4);
return 0;
}
After this function returns I do a DisplayPanel(giPanelHandle);
I have builtin the ToolTip Instrument Driver, but I can't see a ToolTip when I move the mouse over the controls.
What I'am doing wrong, can somebody help ?
l375alk
08-03-2010 03:56 AM