home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / pascal / 7542 < prev    next >
Encoding:
Text File  |  1992-12-17  |  3.5 KB  |  79 lines

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!rpi!ghost.dsi.unimi.it!univ-lyon1.fr!cismibm.univ-lyon1.fr!ppollet
  2. From: ppollet@cismibm.univ-lyon1.fr (Patrick POLLET)
  3. Newsgroups: comp.lang.pascal
  4. Subject: Re: tvision context-sensitive Help
  5. Date: Thu, 17 Dec 1992 07:36:44 GMT
  6. Organization: INSA  CENTRE INFORMATIQUE DU 1er CYCLE
  7. Lines: 66
  8. Distribution: world
  9. Message-ID: <ppollet.77.724577804@cismibm.univ-lyon1.fr>
  10. References: <1go673INN7gi@cs.tut.fi>
  11. NNTP-Posting-Host: 134.214.232.25
  12.  
  13. In article <1go673INN7gi@cs.tut.fi> po87553@cs.tut.fi (Pasi 'Albert' Ojala) writes:
  14. >From: po87553@cs.tut.fi (Pasi 'Albert' Ojala)
  15. >Subject: tvision context-sensitive Help
  16. >Date: 16 Dec 1992 21:14:11 GMT
  17.  
  18. >This is a forwarded message from: Seppo Suutarla                
  19. >                                                                
  20. >Hi, I'm a new Tvision user and I've written a small program with
  21. >bp7.0 and I'd like to get a similar help function as bp7.0 have.
  22. >                                                                
  23. >I've done it so far that I compiled my own help file with       
  24. >tvhc and linked it to my program. My program works just as it   
  25. >was supposed to, but when function key F1 is pressed, a small   
  26. >help window shows up and the contents of it blinks (only the    
  27. >help window texts). The background color of the help window     
  28. >is red.                                                         
  29. >                                                                
  30. >I've taken the following statements from tvdemo.pas:            
  31. >                                                                
  32. >-    {$X+,S-                                                   
  33. >-    {$M 16384,8192,655360                                     
  34. >-    function CalcHelpName: PathStr;                            
  35. >-    procedure TTVDemo.GetEvent(var Event: TEvent);             
  36. >                                                                
  37. >What else I have to consider?                                   
  38. >-Seppo
  39.  
  40. >-- 
  41. > Pasi Ojala - The Other Author of AXsh    po87553@cs.tut.fi albert@cc.tut.fi
  42. > Pasbox / 931-3710024 / 21-06 / v32/v42/v42bis/mnp5
  43.  
  44. In TVision that comes with TP6 , and also (I guess with BP7) the helpviewer
  45. objects use palette entries from 64 to 71 . That is out of the 
  46. standard palette of tApplication (0..63). This explain that blinking red 
  47. color that is the Color for "Out of palette range error " in Tvision 
  48.  
  49.   To make you appliction " HelpAware" you must  overload the tApplication
  50. Getpalette method to  extend its palette to include the Help Colors as 
  51. follow 
  52.  
  53. USES HELPFILE ; (* for CHelpColor..... *)
  54.  
  55. function tMyApp.GetPalette: PPalette;
  56. const
  57.   CStdColor      = CColor      + CHelpColor;
  58.   CStdBlackWhite = CBlackWhite + CHelpBlackWhite;
  59.   CStdMonochrome = CMonochrome + CHelpMonochrome;
  60.   P: array[apColor..apMonochrome] of string[Length(CStdColor)] =
  61.     (CStdColor, CStdBlackWhite, CStdMonochrome);
  62. begin
  63.   GetPalette := @P[AppPalette];
  64. end;
  65.  
  66. I know, it could have been done in the APP unit by Borland ? But I
  67. guess they thought  that HelpFile are optionnal ? 
  68. ppollet@cismibm.univ-lyon1.fr (Patrick POLLET)
  69. --------------------------------------------------------
  70. Dr Patrick L.Pollet
  71. Institut National des Sciences Appliquées
  72. Centre Informatique du 1er Cycle  Bat 110
  73. 20 Avenue A.Einstein
  74. 69621 Villeurbanne Cedex France
  75. --------------------------------------------------------
  76. Phone: 72 43 83 80 -   la premiere erreur c'est
  77. Fax  : 72 43 85 33 -   de se lever le matin  ... GASTON
  78. -------------------------------------------------------
  79.