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