Hyperlink Cell Type text problem

Posted by: rppage on 8 September 2017, 12:59 pm EST

  • Posted 8 September 2017, 12:59 pm EST

    We are using the Farpoint Win spread version 1.0.9.0 and are seeing intermittent painting issues on Hylperlink cells when first loading a form with multiple spreadsheet controls on it.  See the attached examples of both the good and the bad results.


    Approximatley the first half of the text for the hyperlink is missing.  It almost appears the text has been centered to the left side of the cell.  However, there is also a blank space inserted at the left-most side of the cell.


    The spreadsheet controls are on tabs on a form.  Once the problem shows up on one tab it perpetuates to other tabs or forms that have spreadsheet controls on them.  However, changing to a tab without a spreadsheet control on it and then coming back to the problem tab seems to get rid of the issue.


    It should be noted we are using a custom CellType class.  We introduced the class to address bug #16328 for font bold problems.  I have attached the source file for that class as well.


    Of course, this is an extremely intermittent issue, making it difficult to troubleshoot.  Developers have not been able to reproduce it in a development environment but it will show up on user desktops for unknown reasons.


    Has anyone seen this before? Any suggestions?


    Thanks,


    Ray


    2008/01/CustomHyperLinkCellType.cs.txt
  • Replied 8 September 2017, 12:59 pm EST

    attaching image as file, pasting class text below...

     
    public override void PaintCell(System.Drawing.Graphics g, System.Drawing.Rectangle r, FarPoint.Win.Spread.Appearance appearance, object value, bool isSelected, bool isLocked, float zoomFactor)
    {
    FarPoint.Win.Spread.Appearance ourAppearance = new FarPoint.Win.Spread.Appearance();

    ourAppearance.Font = appearance.Font;
    ourAppearance.BackColor = appearance.BackColor;
    ourAppearance.HorizontalAlignment = appearance.HorizontalAlignment;
    ourAppearance.VerticalAlignment = appearance.VerticalAlignment;
    ourAppearance.DrawPrimaryButton = appearance.DrawPrimaryButton;
    ourAppearance.DrawSecondaryButton = appearance.DrawSecondaryButton;
    ourAppearance.LockForeColor = appearance.LockForeColor;
    ourAppearance.LockBackColor = appearance.LockBackColor;
    //oAppearance.ForeColor = appearance.ForeColor;

    //Call base PaintCell function

    base.PaintCell (g, r, ourAppearance, value, isSelected, isLocked, zoomFactor);
    }
     
    2008/01/gridtextproblem.JPG
  • Replied 8 September 2017, 12:59 pm EST

    Hello,


    I have seen an issue like this before. It had to do with the text being displayed, the size of the rectangle being painted into and the font being used. This was a bug in the Spread source that has been fixed. However, I believe it was fixed after we stopped releases on the 1.0 product. You can try getting the latest maintenance release (1.1.0.0) to see if this fixes the issue). But, I believe, you will need to upgrade to the latest version (4.0.2000) to see the issue as fixed.

Need extra support?

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

Learn More

Forum Channels