Help! How to trigger fpspread event: ButtonClicked ?

  • llw_168 2 years, 11 months ago

    I write a celltype class inherited BaseCelltype, it looks like a button, when i run my program, it looks good, but i don’t know how to trigger the buttonclicked event.

  • 1p
    paul19601p 2 years, 11 months ago

    If you are using a ButtonCellType you can catch the FpSpread.ButtonClicked event, if it is a regular cell you should be able to catch the FpSpread.CellClick Event. To wire events up I find it best to create the event stub from the properties tab of the Spread Control in design mode. Just double click the event from the properties tab and it makes the stub and wires it up for you.

  • llw_168 2 years, 11 months ago

    thanks for your suggestion.  The celltype i wanted has two parts, you can input something in one part, and another part is a button. but, i don’t know how to catch the clicked event.In the event, i want to know rowIndex and colIndex of current cell.  Thanks a lot for Paul1960!

  • 1p
    paul19601p 2 years, 11 months ago

    The "FarOut" sample project installed with your product demonstrates creating custom celltypes that inherit from our celltypes and handling their events.

  • 9p
    manpreetkaur9p 2 years, 11 months ago

    Hello,

    To get a button click of the button in a cell, you would need to create the button in the editor
    and catch it’s click event and pass it to the application through a
    public event in your custom celltype. I have created a sample depicting this approach, as soon as the cell enters the edit mode and you click on the button, it displays the row and column index of the active cell. Kindly have a look at the same.

    Hope it will help you. Please let me know if you have any queries further.

    Thanks,

    Manpreet Kaur.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.