3 State Checkbox

Posted by: astonvic on 8 September 2017, 2:41 pm EST

  • Posted 8 September 2017, 2:41 pm EST

    un-check, check with check picture, gray-check with X picture. We would like to know if it has been done or can be!
  • Replied 8 September 2017, 2:41 pm EST

    astonvic,

    You can create a three sate check box using code like the following...

    CheckBoxCellType cellType = new CheckBoxCellType();
    cellType.ThreeState = true;
    fpSpread1.Sheets[0].Cells[0, 0].CellType = cellType;

  • Replied 8 September 2017, 2:41 pm EST

    Can do but what about having 2 different pictures?  Check and X

  • Replied 8 September 2017, 2:41 pm EST

    Hello,

    You cna use the following code in order to set the images for checked and unchecked state for check box cell.

            Dim chk As New FarPoint.Win.Spread.CellType.CheckBoxCellType

            chk.ThreeState = True

            chk.Picture(FarPoint.Win.CheckBoxPictureIndex.True) = Image.FromFile("C:\Program Files\FarPoint Technologies\Spread 8\Samples\Files\pict0.bmp")

            chk.Picture(FarPoint.Win.CheckBoxPictureIndex.False) = Image.FromFile("C:\Program Files\FarPoint Technologies\Spread 8\Samples\Files\pict1.bmp")

            FpSpread1.ActiveSheet.Cells(0, 0).CellType = chk

     

     Thanks,

     

Need extra support?

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

Learn More

Forum Channels