If you mean something like Edit -> Insert from Character Map, you already have the source for that.
...I am attaching a demo in which the IDE's charactermap is extracted to be usable in your own programs. If you want to send characters from the char map to an edit or memo control you must write a handler for the OnInsertCharacterMap which has the character selected in the map as a string parameter...Thanks, your sample works, I have added it in my project succesfully.
And just what is that exception ?Looking in @wp's sample, I suppose that the .pas file did not find the .lfm file, so AnsiGrid.Font.Name := EditorOpts.EditorFont; crashed, because it did not see AnsiGrid as a created item.
Maybe the font name has not been set in your project ? Or the object not created ? I think I would start by removing as much as possible of the Lazarus IDE units from the CharacterMapDlg. (You did make a local copy of it, didn't you ?)
Maybe hard wire a font name until you understand how it all works, EditOpts is from another unit altogether, probably not what you want to use anyway.
Davo
Really, what is the problem to re-read a message after posting?Or use "Preview" button before clicking "Post"...
..... Some totally incoherent stuff ....
crashed, because it did not see AnsiGrid as a created item.
....
I am not sure if preview works, I usually check after posting, because the Lazarus forum changes the font size to ultra-small quite often. But this time I have forgotten, sorry.Really, what is the problem to re-read a message after posting?Or use "Preview" button before clicking "Post"...