Print Page | Close Window

CXTPControlPopup OnMouseHover

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=13388
Printed Date: 23 June 2025 at 6:36am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPControlPopup OnMouseHover
Posted By: lion
Subject: CXTPControlPopup OnMouseHover
Date Posted: 11 February 2009 at 6:19am
Hi,

all I want is handle the onMouseHover Event for a CXTPControlPopup.

CXTPControlPopup* pCtrlPopup = CXTPControlPopup::CreateControlPopup(xtpControlSplitButtonPopup);

1. I don't know how to catch that event in my mainframe.

2. Another way of doing it: I tried to inherit from CXTPControlPopup -> MyControlPopup
MyControlPopup* pMyCtrlPopup = (MyControlPopup*)MyControlPopup::CreateControlPopup(xtpControlSplitButtonPopup);
but then the OnMouseHover Eventhandler is not called, or

3. I can not set the controltype to "xtpControlSplitButtonPopup", when using
MyControlPopup* pMyCtrlPopup = new MyControlPopup();

what would be the best/easiest way, to catch the OnMouseHover event for the CXTPControlPopup-xtpControlSplitButtonPopup, in order so set a dynamic tooltip ?

Thanx in advance
Cheers Bjoern




Replies:
Posted By: lion
Date Posted: 11 February 2009 at 9:21am
ok, i found a way: overriding "CXTPControlPopup* CXTPControlPopup::CreateControlPopup( XTPControlType controlType )"did it now...

but:
how do I make the nee tooltip onMouseHover() appear right away?
I implemented:

void CXTPControlPopupUndo::OnMouseHover() {
    this->SetTooltip( GetMyDynString() );
}

but the string only appears once I leaf the control and hover over it again... that is: the tooltip is always the one before...
what function do i need to call to make my string visible as a tooltip immediately ?

Thanx for some help
Cheers Björn


Posted By: Oleg
Date Posted: 12 February 2009 at 4:51am
Hi,
 
don't change OnMouseHover - Override  GetTooltip and return your dynamic tip.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: lion
Date Posted: 12 February 2009 at 7:24am
yea, thanx! Thats it... Now it works fine.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net