Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Howto set tooltip text of CXTPControlComboBox
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Howto set tooltip text of CXTPControlComboBox

 Post Reply Post Reply
Author
Message
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1198
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Topic: Howto set tooltip text of CXTPControlComboBox
    Posted: 09 December 2006 at 11:19am
Hi;
 
Using toolkit v 10.3.1 I created a CXTPControlComboBox control as found in the samples section of the toolkit, but I'm unable to set the tooltip text to something different than the caption/label of the control. The code in OnCreateControl() function looks like:
 
CXTPControlComboBox* pComboFind = (CXTPControlComboBox*)CXTPControlComboBox::CreateObject();
pComboFind->SetDropDownListStyle();
pComboFind->SetWidth(180);
CString strPrompt;
VERIFY(strPrompt.LoadString(ID_PROCESSEXPLORER_SEARCH));
pComboFind->SetStyle(xtpComboLabel);
pComboFind->SetCaption(strPrompt);
VERIFY(strPrompt.LoadString(ID_PROCESSEXPLORER_SEARCHTIP));
pComboFind->SetTooltip(strPrompt);
pComboFind->SetFlags(xtpFlagManualUpdate);
pComboFind->SetEnabled(TRUE);
 
The tip is always the same as specified in the call to SetCaption().
 
What am I doing wrong?
 
Martin
 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 10 December 2006 at 4:35am
Hi, you all do right.
Problem that later pComboFind->SetID([Id]) will be called and Tooltip text will be replaced from string table. As workaround call
 
pComboFind->SetID([Id]) before pComboFind->SetTooltip.
 
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1198
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Posted: 10 December 2006 at 1:39pm

Thats it!

Many thanks Oleg

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.