Mattias (et al),
Attached are two files.
One is the help system component. Drop this on a form and it implements an HTML context sensitive help system.
The other is a diff I have tried to make. Basically all I did was add a "HelpID" integer property to TWinControl and the expose that in some of the standard controls such as TEdit and TMemo. I peeked inside the diff and it seemed to show other differences - possibly CVS had some newer files than I did when I created the diff. I don't know if this will cause problems for you, but like I said I didn't do anything major, just did as described above.
Hopefully you will find this useful enough for the LCL.
Quick rundown on the THelpSystem component:
You can specify a "preferred browser" such as "opera" and it will try to find it first. if it can't find it then it will look for mozilla, opera, galeon and konqueror in that order. If you don't specify a browser it checks those four. If it's compiled in win32 it looks for iexplorer (should that be iexpore?) after mozilla and opera. I can't test that though... so I assume it works.
When created at runtime, it hooks itself into the parent form's onkeyup event. It will STILL PROCESS any existing onkeyup event for the form, because it will read that address out if it exists and call it after executing it's own code. When destroyed, it replaces the form's original OnKeyUP event handler. There may be a better way with messages, but this was the only way I could figure out how to do it without a major headache and things that are over my head.
You provide a stringlist that contains the helpid number followed by a colon followed by the URL such as:
0:http://tony.maro.net/
1:/home/tony/test.htm
It will also do relative URL's to the executable. When this property is set you can do something like:
2:help/test.htm
and it will look for [applicationpath]/help/test.htm
if the requested helpID doesn't exist in the stringlist, it will look for a helpid in the stringlist of "0" and open it as the default help page. If all else fails it throws a messagedlg stating it couldn't open the help system.
Feel free to rename the component or hack the code or flat out reject it at will. I find it very useful for my project, maybe others will.
