BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Writing a modified TForm

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Development)
View previous topic :: View next topic  
Author Message
David Erbas-White
Guest





PostPosted: Tue Aug 19, 2003 9:47 pm    Post subject: Writing a modified TForm Reply with quote



I'm in the process of writing a modified TForm component, with a couple
of extra properties and events.

I've written some minor components before as modifications of existing
ones, but it suddenly occurred to me that TForm (of course) might have
some significant differences associated with it. For example, you don't
drop a TForm from the pallette, you have to either do New|Form or
New... and pick from the from tab, etc.

What are the quirks/tricks necessary for creating a new TForm type of
component? Do any of the C++ Builder books show an example of how do to
this directly? I'm not asking for 'generic' component creation tips,
but just those that explicitly would be helpful for a TForm descendant.

Thanks, any responses appreciated.

David Erbas-White

Back to top
Rodolfo Frino
Guest





PostPosted: Tue Aug 19, 2003 11:02 pm    Post subject: Re: Writing a modified TForm Reply with quote



I think what you are describing is close to a TFrame which is already a
standard feature of Builder
Have a look a TFrame in the help menu

"But frames can be nested within forms or other frames, and they can be
saved on the
Component palette for easy reuse."

Rodolfo

"David Erbas-White" <derbas (AT) arachneering (DOT) com> wrote

Quote:
I'm in the process of writing a modified TForm component, with a couple
of extra properties and events.



Back to top
Ralph Kazemier
Guest





PostPosted: Thu Aug 21, 2003 12:55 am    Post subject: Re: Writing a modified TForm Reply with quote




"David Erbas-White" <derbas (AT) arachneering (DOT) com> wrote


Quote:
What are the quirks/tricks necessary for creating a new TForm type of
component?

I have never actually managed myself to get it working in BCB, but I think
that what you are looking for is;

RegisterCustomModule


Quote:
Do any of the C++ Builder books show an example of how do to
this directly?

Don't know of any books. But you might want to check out these links;

Using Custom Design Modules
http://www.marcocantu.com/ddh/ddh15/ddh15e.htm


How to Build Forms with Custom Properties and Events in Delphi
http://www.eagle-software.com/superforms.htm


Defining Custom Events for Forms
http://www.undu.com/Articles/000516d.html


Google on 'RegisterCustomModule' for more.


Ralph




Back to top
David Erbas-White
Guest





PostPosted: Thu Aug 21, 2003 5:35 am    Post subject: Re: Writing a modified TForm Reply with quote

Ralph Kazemier wrote:

<snipped a bunch of valuable info> (thanks!)

Quote:
Google on 'RegisterCustomModule' for more.


Ralph




This is very helpful. What is very sad is that in looking in the BCB5
help files I can find no (zero, nada, zilch) mention of
RegisterCustomModule. In the entire BCB5 directory path the only
mentions of it that I can find are the couple of places where it is
used, and the related .BPL/.LIB files (etc.). Not one single word of
documentation.

I really appreciate the links, they look very valuable as well. It is
unfortunate that something that I would have assumed to be fairly
important to be covered is completely ignored (and the links all relate
to Delphi usage, which unfortunately reinforces my recent conclusion
that, while I like C++ Builder, if one is going to use a VCL based RAD
product, it is probably best to use Delphi instead of C++ Builder).

David Erbas-White


Back to top
Ralph Kazemier
Guest





PostPosted: Thu Aug 21, 2003 9:51 am    Post subject: Re: Writing a modified TForm Reply with quote


"David Erbas-White" <derbas (AT) arachneering (DOT) com> wrote


Quote:
What is very sad is that in looking in the BCB5
help files I can find no (zero, nada, zilch) mention of
RegisterCustomModule.

Well yeah, what else is new? Whenever I dive deep into the VCL, it's source
is very helpfull and I often use google as helpsystem ;)


Ralph




Back to top
Tobias Schwinger
Guest





PostPosted: Sun Sep 28, 2003 11:54 am    Post subject: Re: Writing a modified TForm Reply with quote

If I got you right you want to derive your forms from an own subclass of
TForm.

There is a completely simlpe and legal way to do it (; without diving Wink:

- add it to your object repository
- choose new->TMyCustomForm->inherit from to create a new form in your
application

The IDE now treats TMyCustomForm as the base class, showing the properties
you added and so on.

Note that you might run into trouble if you don't tell the IDE (creating a
subclass of TForm and changing
an existing form's base class to that class manually).

Quote:
What is very sad is that in looking in the BCB5
help files I can find no (zero, nada, zilch) mention of
RegisterCustomModule. [...]
Not one single word of documentation.

One reason why certain features are kept undocumented
(especially low-level functions of frameworks) is because their design might
not
be considered stable or final (so this might change in future versions) and
not documenting them keeps people from using them and running into trouble
upgrading
their IDE.




Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Development) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.