CXTPMarkupContext |
Post Reply |
Author | |
zaksoft
Senior Member Joined: 05 June 2003 Location: Italy Status: Offline Points: 162 |
Post Options
Thanks(0)
Posted: 24 March 2009 at 1:48am |
I'd like to know how CMarkupContent can fire event without hyperlink.
Take your StartPageSample.xaml in MarkupPad as example: how can I react to click on news ? if I replace Run with HyperLink all titles are underlines...
Can you please give me some suggestions ?
TIA
|
|
VS2008 SP1 - VS2010 SP1 - VS2012 - MFC MBCS Statically linked
XTP 15.3.1 Static Link --------------------------------------------------------- Davide Zaccanti - ZakSoft - www.zaksoft.com |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Catch m_pMouseLeftButtonDownEvent from this Run instead.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
zaksoft
Senior Member Joined: 05 June 2003 Location: Italy Status: Offline Points: 162 |
Post Options
Thanks(0)
|
I've added...
m_wndBackGround.SetMarkupText( sXaml, MARKUP_NO_SCROLL, MARKUP_CENTERED);
m_wndBackGround.AddHandler( CXTPMarkupHyperlink::m_pClickEvent, CreateMarkupClassDelegate( this, &CCentroView::OnHyperlinkClick));
// >> new
m_wndBackGround.AddHandler( CXTPMarkupHyperlink::m_pMouseLeftButtonDownEvent, CreateMarkupClassDelegate( this, &CCentroView::OnLeftMouseClick)); << and I've added a new function:
void CCentroView::OnLeftMouseClick( CXTPMarkupMouseButtonEventArgs * pArgs){ AfxMessageBox( "OnLeftMouseClick");} But it's not called... I've stepped into debugger andvoid CXTPMarkupInputElement::OnMouseLeftButtonDown(CXTPMarkupMouseButtonEventArgs* /*e*/){ } is called instead.
Can you please give me more information about intercepting this message and how to retrieve tag inserted into <Run> starting from a CXTPMarkupMouseButtonEventArgs pointer ?
TIA |
|
VS2008 SP1 - VS2010 SP1 - VS2012 - MFC MBCS Statically linked
XTP 15.3.1 Static Link --------------------------------------------------------- Davide Zaccanti - ZakSoft - www.zaksoft.com |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
You need SetDelegate insted
Set it before you set Markup
m_wndBackGround.SetDelegate(L"Run_MouseLeftButtonUp", CreateMarkupClassDelegate(this, &CMarkupPadView::OnBorderMouseLeftButtonUp));
and in your markup add <Run MouseLeftButtonUp= 'Run_MouseLeftButtonUp' .... >
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |