Hierarchy

Posted by: shiangshin on 8 September 2017, 2:48 pm EST

  • Posted 8 September 2017, 2:48 pm EST



    Hi ~

    How can I
    insert a picture ‘+’ into spread sheet cell? And how can I get the
    ChildViewCreated event to fire by single clicking on the ‘+’ or ‘-’ ?



    What method inspreadsheet.h” I can use
    to Expand and collapse row ?

    What
    property do I need to set to be able to get this event to fire with a cellclick?



    Thanks
    in advance.

    --------------------------------------------------------------------------------



    Devloping
    in VS C++ Using Spread 8



  • Replied 8 September 2017, 2:48 pm EST

    Spread 8 does not support hierachies natively but you can mimic the behavior. The Demo Overview sample located in C:\Program Files\Farpoint Technologies\Spread8\Samples\ActiveX\VB6 folder demonstrates how. As far as setting a picture into an Image cell the help has code demonstraing that.

    To access the file used in this sample, change the path in the code to the
    path for your product installation's \SAMPLES\FILES directory.

    C++

    // Define variables
    PIC picture
    HBITMAP hBitmap
    //
    Specify a cell
    m_Spread.SetCol(2);
    m_Spread.SetRow(3);
    // Change height
    of row to display the picture
    m_Spread.SetRowHeight(3,27);
    // Set the
    column width
    m_Spread.SetColWidth(2,6);
    // Define cell type as
    picture
    m_Spread.SetCellType(CellTypePicture);
    // Display the
    picture
    // Convert hBitmap
    CPictureHolder picture;
    HBITMAP hBitmap =
    AfxGetApp()->LoadBitmap(IDB_CARD);
    picture.CreateFromBitmap(hBitmap);
    m_Spread.SetTypePictPicture(picture.GetPictureDispatch());
    //
    Center the picture
    m_Spread.SetTypePictCenter(TRUE);
    // Set the cell's
    background color
    // dark blue, RGB(0, 0,
    128)
    m_Spread.SetBackColor(0x800000);

    Visual Basic

    ' Specify a cell
    fpSpread1.Col = 2
    fpSpread1.Row = 3
    '
    Change height of row to display the picture
    fpSpread1.RowHeight(3) = 27
    '
    Set the column width
    fpSpread1.ColWidth(2) = 6
    ' Define cell type as
    picture
    fpSpread1.CellType = CellTypePicture
    ' Display the
    picture
    fpSpread1.TypePictPicture =
    LoadPicture("C:\Samples\Files\CARD.BMP")
    ' Center the picture

    fpSpread1.TypePictCenter = True
    ' Set the cell's background color
    '
    dark blue, RGB(0, 0, 128)
    fpSpread1.BackColor = &H800000&

Need extra support?

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

Learn More

Forum Channels