Print Page | Close Window

Markup: Image hyperlink?

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=17055
Printed Date: 20 June 2025 at 9:47am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Markup: Image hyperlink?
Posted By: znakeeye
Subject: Markup: Image hyperlink?
Date Posted: 03 August 2010 at 3:35am
In a TextBlock you simply add a Hyperlink tag to make it clickable. But how do you make an image clickable?
 
m_staticInfo.AddHandler(CXTPMarkupHyperlink::m_pClickEvent, CreateMarkupClassDelegate(this, &OnHyperlinkClick));
 
<TextBlock><Hyperlink Tag='mylink'>blah</Hyperlink></TextBlock> Works!
vs
<Image Source='file://c:\windows\Zapotec.bmp' Tag='mylink' Cursor='Hand'/> Doesn't work... :(
 
 
Maybe I need another event handler?


-------------
PokerMemento - http://www.pokermemento.com/



Replies:
Posted By: Oleg
Date Posted: 03 August 2010 at 10:37am
Hi,

Image doesn't have Click event. Use m_pMouseLeftButtonDownEvent instead.

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


Posted By: znakeeye
Date Posted: 04 August 2010 at 5:17am
I tried that, but the handler never gets called! (Image is inside a grid btw.)
 
(Running XTP 12.0.1)


-------------
PokerMemento - http://www.pokermemento.com/


Posted By: Oleg
Date Posted: 05 August 2010 at 5:42am
Hi,

How your code / markup looks now ?

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


Posted By: zitz
Date Posted: 31 August 2010 at 3:38am
I add Hyperlink on image like this:

   CString sMurkupElem;
    sMurkupElem.Format( _T("<TextBlock VerticalAlignment='Center'>")
                        _T("<Hyperlink Tag='%s' TextDecorations=''>")
                        _T("<Image Width='16' Height='16' Source='%d'/>")
                        _T("</Hyperlink>")
                        _T("</TextBlock>"),
                        CXXXMarkup::StringToMarkupFormat( _T("remove_performer") ),
                        ID_CROSS_CLOSE_BUTTON );



-------------
Xtreme ToolkitPro v13.1.0, static, VC++6



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