Bob Stanton wrote:
> When I tried:
>    Panel2 := (StringToComponent(Str)) as TPanel;
> I get a Runtime error:
>   "Class TPanel not found"
> 
> What am I doing wrong ?

For starters, you're quoting WAY more of my message than you needed to.

That error message comes from a call to FindClass or GetClass, which is 
what maps class names to the actual run-time classes. They search a list 
of classes generated by the RegisterClass function. I would have 
expected TPanel to already be registered, but maybe it isn't. Register 
it with RegisterClass before you try loading the string.

-- 
Rob


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/i7folB/TM
--------------------------------------------------------------------~-> 

-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to