Exception on Hyperlink CellType

Posted by: silkkeng-fp on 8 September 2017, 2:16 pm EST

  • Posted 8 September 2017, 2:16 pm EST


    I am getting an exception below:

    System.ArgumentException: Parameter is not valid.
       at System.Drawing.Graphics.MeasureCharacterRanges(String text, Font font, RectangleF layoutRect, StringFormat stringFormat)
       at FarPoint.Win.FpHyperlink.IsPointInLink(Graphics g, Int32 x, Int32 y, Rectangle r, String text, Font f, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment, LinkArea[] areas, Picture pict, Boolean rightToLeft)
       at FarPoint.Win.FpHyperlink.OnMouseMove(MouseEventArgs e)
       at System.Windows.Forms.Control.WmMouseMove(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at FarPoint.Win.ControlBase.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


    I create an Hyperlinkcelltype, when I click on this cell, it invoke another action.

    The Hyperlink cell does not have text, and it only shows image.

    The problem remains in my current application. But, I can't seems to replicate the issue in the attached test project.

    1 things I noticed is if I set LinkArea =Nothing, it then doesn't throw the error. I have used this as my workaround.


    Appreciates if you could shed some lights.




  • Replied 8 September 2017, 2:16 pm EST

    Hello David,

    I am not getting any exception when I click on the Image in the hyperlink cell using the sample provided by you..I clicked in the blank area and it also works fine the cursor changes to a hand cursor over the image.

    Please let me know if I am missing something.It uses Spread 4.0.2015.2005(latest).



Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels