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 

TComponent with TLabel "designtime" on TDataModule

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Non-Technical
View previous topic :: View next topic  
Author Message
Frenk
Guest





PostPosted: Thu Jul 28, 2005 9:45 am    Post subject: TComponent with TLabel "designtime" on TDataModule Reply with quote



Hi,
I was looking for an answer almost everywhere but didn't get an answer.

I have a component (TComponent descendant) which is for use on TDataModule
and must look like TLabel (not as a rectangle with icon). I also did custom
Form designer (for a derived datamodule).
Is it even possible to make "TLabel" representation of a component in
TDataModule? Is there any sample, hotw to create designt-time representation
of a a component?

Regards,
Frenk


Back to top
Dave Nottage [TeamB]
Guest





PostPosted: Thu Jul 28, 2005 9:59 am    Post subject: Re: TComponent with TLabel "designtime" on TDataModule Reply with quote



Frenk wrote:

Quote:
Is it even possible to make "TLabel" representation of a component in
TDataModule?

Not really, since DataModules don't have visual components. It might
help to know exactly why you want to do this.

--
Dave Nottage [TeamB]

Back to top
Frenk
Guest





PostPosted: Thu Jul 28, 2005 10:06 am    Post subject: Re: TComponent with TLabel "designtime" on TDataModule Reply with quote



situation:
TMyComponent = class(TComponent)
end
.....
After this component is put into DataModule (design time), instead of
standard visual representation of TComponent (a rectangle with an icon in a
center) "Label" should be painted (as a visual representanion of the
TMyComponent object) on designtime surface.

Frenk


Quote:

Not really, since DataModules don't have visual components. It might
help to know exactly why you want to do this.

--
Dave Nottage [TeamB]



Back to top
Dave Nottage [TeamB]
Guest





PostPosted: Thu Jul 28, 2005 11:03 am    Post subject: Re: TComponent with TLabel "designtime" on TDataModule Reply with quote

Frenk wrote:

Quote:
situation:
TMyComponent = class(TComponent)
end
....
After this component is put into DataModule (design time), instead of
standard visual representation of TComponent (a rectangle with an
icon in a center) "Label" should be painted (as a visual
representanion of the TMyComponent object) on designtime surface.

That still doesn't tell me why.

--
Dave Nottage [TeamB]

Back to top
Frenk
Guest





PostPosted: Thu Jul 28, 2005 1:05 pm    Post subject: Re: TComponent with TLabel "designtime" on TDataModule Reply with quote

Want to make design time user interface (sort of telnet) that can be used
inside COM+ (multithreading environment, like ISAPI, e.g. intraweb). So I
need designtime, but I don't want to have a component on the datamodule
which must be clicked to open designer (ShowModal).

"Dave Nottage [TeamB]" <davidn (AT) n0sp4m (DOT) please.radsoft.com.au> wrote in
message news:42e8bb92 (AT) newsgroups (DOT) borland.com...
Quote:
Frenk wrote:

situation:
TMyComponent = class(TComponent)
end
....
After this component is put into DataModule (design time), instead of
standard visual representation of TComponent (a rectangle with an
icon in a center) "Label" should be painted (as a visual
representanion of the TMyComponent object) on designtime surface.

That still doesn't tell me why.

--
Dave Nottage [TeamB]



Back to top
Dave Nottage [TeamB]
Guest





PostPosted: Thu Jul 28, 2005 1:24 pm    Post subject: Re: TComponent with TLabel "designtime" on TDataModule Reply with quote

Frenk wrote:

Quote:
Want to make design time user interface (sort of telnet) that can be
used inside COM+ (multithreading environment, like ISAPI, e.g.
intraweb). So I need designtime, but I don't want to have a component
on the datamodule which must be clicked to open designer (ShowModal).

I don't think that's going to be possible without a deal of messing
around with how a DataModule itself behaves.

I personally don't see anything wrong with showing a form when
double-clicking the component (or right-clicking and having a menu item
available for it). That kind of thing works OK for the fields editor
for a TDataset component, and the form it shows is not modal.

--
Dave Nottage [TeamB]

Back to top
Frenk
Guest





PostPosted: Thu Jul 28, 2005 2:06 pm    Post subject: Re: TComponent with TLabel "designtime" on TDataModule Reply with quote

I already implemented CustomDesigner for form (datamodule descendant). The
question is, how to register "label" representation to TComponent descendant
(like TLabel design-time is bound to TLabel runtime) in design time.
CustomDesigner has ComponentContainer TScroolBox, so it is possible to use
TLabel as design time representation ("FormDesigner" have the same
implementation)?

Is it possible to get some docs or examples of implementing CustomDesigner?

"Dave Nottage [TeamB]" <davidn (AT) n0sp4m (DOT) please.radsoft.com.au> wrote in
message news:42e8dc8e (AT) newsgroups (DOT) borland.com...
Quote:
Frenk wrote:

Want to make design time user interface (sort of telnet) that can be
used inside COM+ (multithreading environment, like ISAPI, e.g.
intraweb). So I need designtime, but I don't want to have a component
on the datamodule which must be clicked to open designer (ShowModal).

I don't think that's going to be possible without a deal of messing
around with how a DataModule itself behaves.

I personally don't see anything wrong with showing a form when
double-clicking the component (or right-clicking and having a menu item
available for it). That kind of thing works OK for the fields editor
for a TDataset component, and the form it shows is not modal.

--
Dave Nottage [TeamB]



Back to top
Sergio Sette
Guest





PostPosted: Thu Jul 28, 2005 2:20 pm    Post subject: Re: TComponent with TLabel "designtime" on TDataModule Reply with quote

I think you need to implement a ComponentEditor or an SelectionItem instead
of a CustomDesigner.

Best Regards

sergio sette


Back to top
Frenk
Guest





PostPosted: Thu Jul 28, 2005 2:44 pm    Post subject: Re: TComponent with TLabel "designtime" on TDataModule Reply with quote

Component editor execute method is fired when dblclick on component occours.
So to late. Selection also has no method "Paint designtime representatnion".

Will ask another way (don't ask why, the idea is to describe a problem).
What to do that Tcomponent descendant TMyComponent on TForm will show in
designtime as TLabel?

Frenk

"Sergio Sette" <xssette (AT) xtin (DOT) it> wrote

Quote:
I think you need to implement a ComponentEditor or an SelectionItem
instead
of a CustomDesigner.

Best Regards

sergio sette





Back to top
Dave Nottage [TeamB]
Guest





PostPosted: Thu Jul 28, 2005 3:05 pm    Post subject: Re: TComponent with TLabel "designtime" on TDataModule Reply with quote

Frenk wrote:

Quote:
What to do that Tcomponent descendant TMyComponent on TForm will show
in designtime as TLabel?

Descend it from TCustomLabel, presumably.

As I alluded to in my previous replies, DataModules don't "accept"
"visual" components. Again, I really can't see what the problem is with
creating a component designer that is invoked by the context menu or by
double-clicking it.

--
Dave Nottage [TeamB]

Back to top
Frenk
Guest





PostPosted: Thu Jul 28, 2005 7:01 pm    Post subject: Re: TComponent with TLabel "designtime" on TDataModule Reply with quote

Why not? Because you have problems with thread-safety if you create TForm
descendant in ISAPI/COM+ Free model. So everything shoud be descend form
TDatamodule, but also visual designer is needed.
Isn't here any borland developer or somebody that did the same thing or know
how to do that (maybe guys from intraweb or EWF?)
Frenk

"Dave Nottage [TeamB]" <davidn (AT) n0sp4m (DOT) please.radsoft.com.au> wrote in
message news:42e8f444$1 (AT) newsgroups (DOT) borland.com...
Quote:
Frenk wrote:

What to do that Tcomponent descendant TMyComponent on TForm will show
in designtime as TLabel?

Descend it from TCustomLabel, presumably.

As I alluded to in my previous replies, DataModules don't "accept"
"visual" components. Again, I really can't see what the problem is with
creating a component designer that is invoked by the context menu or by
double-clicking it.

--
Dave Nottage [TeamB]



Back to top
Dave Nottage [TeamB]
Guest





PostPosted: Thu Jul 28, 2005 10:01 pm    Post subject: Re: TComponent with TLabel "designtime" on TDataModule Reply with quote

Frenk wrote:

Quote:
Why not? Because you have problems with thread-safety if you create
TForm descendant in ISAPI/COM+ Free model. So everything shoud be
descend form TDatamodule, but also visual designer is needed.

I don't see what that has to do with what I said.

--
Dave Nottage [TeamB]

Back to top
Frenk
Guest





PostPosted: Fri Jul 29, 2005 12:54 am    Post subject: Re: TComponent with TLabel "designtime" on TDataModule Reply with quote

never mind. I solved the problem. Sometimes it is (too) hard to explain why
if only a solution is needed.
Rgds,
Frenk

"Dave Nottage [TeamB]" <davidn (AT) n0sp4m (DOT) please.radsoft.com.au> wrote in
message news:42e955cc (AT) newsgroups (DOT) borland.com...
Quote:
Frenk wrote:

Why not? Because you have problems with thread-safety if you create
TForm descendant in ISAPI/COM+ Free model. So everything shoud be
descend form TDatamodule, but also visual designer is needed.

I don't see what that has to do with what I said.

--
Dave Nottage [TeamB]



Back to top
Joe Bain
Guest





PostPosted: Fri Jul 29, 2005 9:52 pm    Post subject: Re: TComponent with TLabel "designtime" on TDataModule Reply with quote

Do you mind sharing the solution, so if anyone else has the same
problem we don't have to go though this again. :)



--------------
Joe Bain
www.iegsoftware.com
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Non-Technical 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.