Board index » delphi » delphi question: installing a new component on the comp pallette

delphi question: installing a new component on the comp pallette

hi,
i am trying to install a new component on the component pallete.
firstly i am creating the unit. Below is the code that is contained
inside the unit, although i dont really need to mention it because
there doesnt seem to be a problem with it, but anyway:

unit Unit1;

interface

uses

  WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls,
Forms,   Dialogs,       StdCtrls;

type

  TCloseButton = class(TButton)

  private

  protected

  public
    constructor Create(AOwner: TComponent) ; override ;

  published

  end;

procedure Register;

implementation

constructor TCloseButton.Create(AOwner: TComponent) ;
begin
     inherited Create(AOwner) ;
     Caption := '&Close' ;
     Default := True ;
     Hint := 'This will close the form' ;
end ;

procedure TCloseButton.Click ;
begin
     inherited Click ;
     (Owner as TForm).Close ;
end ;

procedure Register;
begin
    RegisterComponents('Samples', [TCloseButton]);
end;

end.

When i have saved it i am then trying to register it on the component
pallete. in delphi 6 i am going to Components|Install Component...
which then presents a dialogue box with a few fields. As all the
fields are filled (even the one with the path to my unit file) i then
click OK. It then asks me whether i would like delphi to rebuild some
file (i cant remember which one). After selecting yes to rebuild it
gives a new inspector window then giving me the option to compile.
sometimes i need to click the install button after compiling but it
does give me a alert box saying the new component has been installed.
then i close down the dialogue box asking if i want to save the file
something.dlk (i cant remember the exact name of the file or its
extention but its the right one) and i click yes.

while i have the component unit alone open it is present on the
pallete on the samples page with a TButton component icon. when i open
a form so i can test my new component it doesnt appear on the pallete
although when i select Components|Configure Pallete... and goto
samples it IS there.

any help would be much appreciated as i am keen to test my fancy new
button. thanks

martynb

 

Re:delphi question: installing a new component on the comp pallette


Quote
In article <651c6ea9.0211060335.f0bf...@posting.google.com>, mr_burns wrote:
> i am trying to install a new component on the component pallete.
> firstly i am creating the unit. Below is the code that is contained
> inside the unit, although i dont really need to mention it because
> there doesnt seem to be a problem with it, but anyway:

You might try asking Delphi questions in a Delphi group. This group is about
other (non-delphi) versions of the Borland Pascal compilers.

Re:delphi question: installing a new component on the comp pallette


Marco van de Voort <mar...@toad.stack.nl> wrote in message <news:slrnasi5oc.1qpc.marcov@toad.stack.nl>...

Quote
> In article <651c6ea9.0211060335.f0bf...@posting.google.com>, mr_burns wrote:
> > i am trying to install a new component on the component pallete.
> > firstly i am creating the unit. Below is the code that is contained
> > inside the unit, although i dont really need to mention it because
> > there doesnt seem to be a problem with it, but anyway:

> You might try asking Delphi questions in a Delphi group. This group is about
> other (non-delphi) versions of the Borland Pascal compilers.

are there any dedicated delphi groups available,  i found a few but
there is a note next to them saying that the group is no longer
archive. it lets you read previous posts but doesnt allow you to put a
post.

why is this? doesnt anybody like delphi anymore? cheers

martynb

Re:delphi question: installing a new component on the comp pallette


Quote
mr_burns <bissa...@yahoo.co.uk> wrote:
> are there any dedicated delphi groups available,  i found a few but

 news:comp.lang.pascal.delphi.advocacy Contentious issues related to Delphi.
 news:comp.lang.pascal.delphi.announce Delphi related announcements. (Moderated)
 news:comp.lang.pascal.delphi.components.misc General component issues.
 news:comp.lang.pascal.delphi.components.usage Using pre-written components.
 news:comp.lang.pascal.delphi.components.writing Writing Delphi components.
 news:comp.lang.pascal.delphi.databases Database aspects of Borland Delphi.
 news:comp.lang.pascal.delphi.misc General issues with Borland Delphi.
 news:comp.sources.delphi Delphi and ObjectPascal source code. (Moderated)

   All the best, Timo

--
Prof. Timo Salmi ftp & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance  ; University of Vaasa
mailto:t...@uwasa.fi <http://www.uwasa.fi/~ts/>  ; FIN-65101,  Finland
Timo's  FAQ  materials  at   http://www.uwasa.fi/~ts/http/tsfaq.html

Re:delphi question: installing a new component on the comp pallette


Quote
"mr_burns" <bissa...@yahoo.co.uk> wrote in message

news:651c6ea9.0211070438.ea2b585@posting.google.com...
Quote
> Marco van de Voort <mar...@toad.stack.nl> wrote in message

<news:slrnasi5oc.1qpc.marcov@toad.stack.nl>...

Quote
> > In article <651c6ea9.0211060335.f0bf...@posting.google.com>, mr_burns wrote:
> > > i am trying to install a new component on the component pallete.
> > > firstly i am creating the unit. Below is the code that is contained
> > > inside the unit, although i dont really need to mention it because
> > > there doesnt seem to be a problem with it, but anyway:

> > You might try asking Delphi questions in a Delphi group. This group is about
> > other (non-delphi) versions of the Borland Pascal compilers.

> are there any dedicated delphi groups available,  i found a few but
> there is a note next to them saying that the group is no longer
> archive. it lets you read previous posts but doesnt allow you to put a
> post.

ISTR that Borland stopped accepting posts to borland.public.* that
weren't made through its own server.  Access Borland Groups through:

 newsgroups.borland.com

Quote

> why is this? doesnt anybody like delphi anymore? cheers

What's not to like?

There's plenty of people there.

Rufus

Re:delphi question: installing a new component on the comp pallette


Quote
"mr_burns" <bissa...@yahoo.co.uk> wrote in message

news:651c6ea9.0211070438.ea2b585@posting.google.com...

Quote

...
> are there any dedicated delphi groups available,  i found a few but
> there is a note next to them saying that the group is no longer
> archive. it lets you read previous posts but doesnt allow you to put a
> post.

Are you trying to read newsgroups through a web page instead of a
newsreader? (Hmm. Your message seems to be from posting.google.com) It may
be a problem with the website, if so. There are lots of news servers. Your
ISP's homepage should have the details of its server. Some carry more
newsgroups than others. A website archive of news articles may be even more
selective. There are lots of newsreaders around, you may have got Outlook
Express with your computer, for example. You might have better luck using
such a program. Point it at a news server and use that directly. You don't
have to stick to just those newsgroups that a website owner thinks you
should be interested in.

FP

Other Threads