Focus on a Cell

Posted by: fhcnunes-fp on 8 September 2017, 12:36 pm EST

  • Posted 8 September 2017, 12:36 pm EST

    Active cell has a mark that indicates the focus. This mark is a rectangle with a border diferent of the border of sheet lines. Is it possible to change the border of focus in cells with some characteristics, like  locked cells? Is there a method that permits me to change the border style of focus rectangle when I enter in a specific cell? If it is necessary some code, could you send me a sample of this code?
  • Replied 8 September 2017, 12:36 pm EST

    The focus rectangle is applied to the entire spread and does not take into account characteristics of particular cells.  The beta of  version 3 does include some different types of focus rectangles and you could query if you are in one of those cells and then change the rectangle.  Or create your own rectangle and do the same.
  • Replied 8 September 2017, 12:36 pm EST

    Which methods can I use to change the type of focus rectangle.
    I am using beta of version 3.
  • Replied 8 September 2017, 12:36 pm EST

    You can do the following, for example...

    FpSpread1.FocusRenderer = New FarPoint.Win.Spread.MarqueeFocusIndicatorRenderer(Color.Orange, 2)

    There is also the DefaultFocusIndicatorRenderer, ImageFocusIndicatorRenderer and SolidFocusIndicatorRenderer.  Or you can create your own...

    <font class="keyword">Dim</font> bm <font class="keyword">As</font>
    <font class="keyword">New</font> Bitmap(2, 2)
    bm.SetPixel(0, 0,
    bm.SetPixel(0, 1, Color.Red)
    bm.SetPixel(1, 0,
    bm.SetPixel(1, 1, Color.Black)

    <font class="keyword">Dim</font> cfi <font class="keyword">As</font> <font class="keyword">New</font> FarPoint.Win.Spread.CustomFocusIndicatorRenderer(bm,

    FpSpread1.FocusRenderer = cfi

Need extra support?

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

Learn More

Forum Channels