Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Markup: Image hyperlink?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Markup: Image hyperlink?

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

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Topic: Markup: Image hyperlink?
    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/
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: 03 August 2010 at 10:37am
Hi,

Image doesn't have Click event. Use m_pMouseLeftButtonDownEvent instead.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post 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/
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: 05 August 2010 at 5:42am
Hi,

How your code / markup looks now ?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
zitz View Drop Down
Senior Member
Senior Member


Joined: 05 October 2008
Status: Offline
Points: 112
Post Options Post Options   Thanks (0) Thanks(0)   Quote zitz Quote  Post ReplyReply Direct Link To This Post 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
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.219 seconds.