I want to add the ability to change the font of a selected cell or group of cells using a Font Dialog Box in a spreadsheet project I am working on. As practice, I tried doing this with one of the demo projects in fpspreadsheet-1.10.1, but keep getting an error when I try to change the font.
To test my method, I opened project demo_ctrls.lpi contained in ...\fpspreadsheet-1.10.1\examples\visual\fpsctrls. I added sFontDialogAction1 to ActionList1 and a glyph for the action to ImageList1. I assigned the action's WorkbookSource property to sWorkbookSource1. I added a ToolButton (ToolButton4) to ToolBar1 and assigned its Action property to sFontDialogAction1 in the properties window. All other properties of all added items were left at their default values.
The project compiles and runs OK. But when I try to change the font using the new ToolButton, I get the error message "Invalid font index. Press OK to ignore and risk data corruption. Press Abort to kill the program." What am I doing wrong? I must be missing something. Any help would be appreciated.