Board index » delphi » Couple of questions

Couple of questions

Hello,
I have a couple of questions.
1.)  How can I make a professional help file?  For instance, something like
the delphi help file where the file has an easy navigation system and the
.hlp file.

2.)  Is there any way to use different colors on the DBGrid component for
different records.
   EX.   Record1 = Red color
            Record2 = Black
            Record3 = Black
            Record4 = Blue
  There is no set color for each record.  I would just like the user of the
DB app to be able to use certain colors for certain records.  Kinda like all
Receives are black and all Shipments are Red.  Any ideas?

Thanks for the help in advance,
Jeff

 

Re:Couple of questions


No cluons were harmed when "Jeff Speed" <spee...@hotmail.com> wrote:

Quote
>1.)  How can I make a professional help file?

There are several options here:

1 - Windows Help Authoring Tool: Basically a free 'enhancement' to
Word, but it will do the job if you don't have hundreds of topics.

2- Freeware/Shareware: Check out the Delphi Super Page at:
   http://delphi.icm.edu.pl/ I don't know the names of any of the
components, but you should be able to search their database.

3 - Professional software: I've used RoboHelp, and like it. I haven't
used ForeHelp, so I don't know, but others swear by it. Both software
packages are very expensive, although they really help manage the
software help projects.

Quote
>2.)  Is there any way to use different colors on the DBGrid component for
>different records.
>   EX.   Record1 = Red color
>            Record2 = Black
>            Record3 = Black
>            Record4 = Blue

beats me. Maybe if you put code in the DrawCell event to differentiate
between the rows that need either the cell and/or the text
highlighted?

Mark Edwards
------------
Proof of Sanity Forged Upon Request

Re:Couple of questions


Hello,

the following code will colour negative fields in red:

- Set DBGrid1.DefaultDrawing to False
- Use the following OnDrawColumnCell:

procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
  DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
  with Sender as TCustomDBGrid do
  begin
    if (Canvas.Font.Color = Column.Font.Color) and
      Assigned(Column.Field) and
      (StrToIntDef(Column.Field.AsString, 0) < 0) then
      Canvas.Font.Color := clRed;
    DefaultDrawColumnCell(Rect, DataCol, Column, State);
  end;
end;

(Snipped from a posting of M.H.Avegaart, hopefully he don't mind)

Then you get the idea to do what you want.

:)
Kai Inge

Quote
"Jeff Speed" <spee...@hotmail.com> wrote in message

news:ExCj5.12613$ov2.188723@news-west.usenetserver.com...
Quote
> Hello,
> I have a couple of questions.
> 1.)  How can I make a professional help file?  For instance, something
like
> the delphi help file where the file has an easy navigation system and the
> .hlp file.

> 2.)  Is there any way to use different colors on the DBGrid component for
> different records.
>    EX.   Record1 = Red color
>             Record2 = Black
>             Record3 = Black
>             Record4 = Blue
>   There is no set color for each record.  I would just like the user of
the
> DB app to be able to use certain colors for certain records.  Kinda like
all
> Receives are black and all Shipments are Red.  Any ideas?

> Thanks for the help in advance,
> Jeff

Re:Couple of questions


Quote
"Jeff Speed" <spee...@hotmail.com> wrote in message

news:ExCj5.12613$ov2.188723@news-west.usenetserver.com...

Quote
> Hello,
> I have a couple of questions.
> 1.)  How can I make a professional help file?  For instance, something
like
> the delphi help file where the file has an easy navigation system and the
> .hlp file.

http://www.jgsoft.com/

Very well integrated with Delphi, you can write the help as you code and
test, and reasonably inexpensive. A bit buggy at times.

--
Bob Kaplan
Advantage Software
sa...@advantsoft.com

Re:Couple of questions


Jeff

Try this url. I use it.  Works fine and costs peanuts.

http://www.jgsoft.com/helpscr.html

Alan Jeffery
Professional Systems

Quote
Jeff Speed wrote in message ...
>Hello,
>I have a couple of questions.
>1.)  How can I make a professional help file?  For instance, something like
>the delphi help file where the file has an easy navigation system and the
>.hlp file.

>2.)  Is there any way to use different colors on the DBGrid component for
>different records.
>   EX.   Record1 = Red color
>            Record2 = Black
>            Record3 = Black
>            Record4 = Blue
>  There is no set color for each record.  I would just like the user of the
>DB app to be able to use certain colors for certain records.  Kinda like
all
>Receives are black and all Shipments are Red.  Any ideas?

>Thanks for the help in advance,
>Jeff

Re:Couple of questions


Hi Jeff !

When you install Delphi, you got program for creating help file. You can
find it at :

C:\Program Files\Borland\Delphi5\Help\Tools\hcw.exe

or somewhere else where you installed Delphi. Probably there are better
software for creating help file, but I don't mind using this program.

Bob

Re:Couple of questions


Here is something that I used which may be a little simplier:
procedure TfrmMshpDB.MbrDrawDataCell(Sender: TObject; const Rect: TRect;
  Field: TField; State: TGridDrawState);
begin
  begin
    if ( not aFtcDBMembership.IsFinancialAtDate ( Date ) ) or
       ( not aFtcDBMember.IsActiveAtDate ( date) ) then
    begin
{
  For those inactive members, Lowlight the grid cells as a clue.
  Sourced from PC Techniques Oct/Nov 1995 Vol 6 No 4.
Quote
}

       DBGrid1.Canvas.Font.Color := clGrayText;
    end;
    DBGrid1.DefaultDrawDataCell( Rect, Field, State);
  end;
end;

However, having looked at this code afresh, you should not refer the actual
component as I originally did but class the Sender parameter as Ellinor did
below.

Quote
Ellinor Jensen wrote:
> Hello,

> the following code will colour negative fields in red:

> - Set DBGrid1.DefaultDrawing to False
> - Use the following OnDrawColumnCell:

> procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
>   DataCol: Integer; Column: TColumn; State: TGridDrawState);
> begin
>   with Sender as TCustomDBGrid do
>   begin
>     if (Canvas.Font.Color = Column.Font.Color) and
>       Assigned(Column.Field) and
>       (StrToIntDef(Column.Field.AsString, 0) < 0) then
>       Canvas.Font.Color := clRed;
>     DefaultDrawColumnCell(Rect, DataCol, Column, State);
>   end;
> end;

> (Snipped from a posting of M.H.Avegaart, hopefully he don't mind)

> Then you get the idea to do what you want.

> :)
> Kai Inge

> "Jeff Speed" <spee...@hotmail.com> wrote in message
> news:ExCj5.12613$ov2.188723@news-west.usenetserver.com...
> > Hello,
> > I have a couple of questions.
> > 1.)  How can I make a professional help file?  For instance, something
> like
> > the delphi help file where the file has an easy navigation system and the
> > .hlp file.

> > 2.)  Is there any way to use different colors on the DBGrid component for
> > different records.
> >    EX.   Record1 = Red color
> >             Record2 = Black
> >             Record3 = Black
> >             Record4 = Blue
> >   There is no set color for each record.  I would just like the user of
> the
> > DB app to be able to use certain colors for certain records.  Kinda like
> all
> > Receives are black and all Shipments are Red.  Any ideas?

> > Thanks for the help in advance,
> > Jeff

--
Cut down on Junk EMAIL
Remove NOSPAM to reply

Re:Couple of questions


However, you will still need to create an RTF file. I have used Microsoft
Word (sometimes referred to as Microsludge etc) to create the RTF file.
Delphi 1 actually came with a Help file describing how to create the help
file using word. I have also used Amipro to create the RTF file but you must
be careful what features you use.

Quote
Bojan Huljev wrote:
> Hi Jeff !

> When you install Delphi, you got program for creating help file. You can
> find it at :

> C:\Program Files\Borland\Delphi5\Help\Tools\hcw.exe

> or somewhere else where you installed Delphi. Probably there are better
> software for creating help file, but I don't mind using this program.

> Bob

--
Cut down on Junk EMAIL
Remove NOSPAM to reply

Other Threads