PC Review


Reply
Thread Tools Rate Thread

Custom Control - strange Design Time behviour

 
 
Adam Rzecki
Guest
Posts: n/a
 
      8th Feb 2009
Hello,

I have a problem connected with a custom control I created.

I derived the custom control from System.Windows.Forms.TextBox.

The strange problem is that when I drag and drop my new control from the
toolbox onto a form, the control doesn't display its Text property
value. Instead of this, it just shows its class name
(MyProject.Controls.SmartTextBox)...

After this, I tried do the same with a new UserControl. I created a
UserControl derived class and put a button onto it. When I drag the User
Control and drop onto my form, only its class name, but no button (no
content) is displayed.

Finally, I created a new project, then derived Custom Control from
TextBox and... it worked - control was visible and its "Text" property
value was properly displayed inside. So I suppose something is wrong
with my project... :-(

Thank you in advance for any suggestions or informations,
Best regards,
Adam.

--
Adam Rzecki





 
Reply With Quote
 
 
 
 
Adam Rzecki
Guest
Posts: n/a
 
      9th Feb 2009
Hello,

I have established that the problem occurs only in .NET CF application
(as mine is). The problem is connected with SQLite ADO.NET assembly I
use. Wherever I use any of types from that assembly (e.g. in a form,
simple class, in method or as static, non-static, public, private field,
etc.), even if it is something like that:
System.Data.SQLite.SQLiteConnection conn = null;

the strange behaviour of derived constrols occur. What is most important
it does not matter _where_. This can be reproduced doing things
mentioned above in _any_ of *.cs project files.

Thanks for any explanation,
BR,
A.


Adam Rzecki pisze:
> Hello,
>
> I have a problem connected with a custom control I created.
>
> I derived the custom control from System.Windows.Forms.TextBox.
>
> The strange problem is that when I drag and drop my new control from the
> toolbox onto a form, the control doesn't display its Text property
> value. Instead of this, it just shows its class name
> (MyProject.Controls.SmartTextBox)...
>
> After this, I tried do the same with a new UserControl. I created a
> UserControl derived class and put a button onto it. When I drag the User
> Control and drop onto my form, only its class name, but no button (no
> content) is displayed.
>
> Finally, I created a new project, then derived Custom Control from
> TextBox and... it worked - control was visible and its "Text" property
> value was properly displayed inside. So I suppose something is wrong
> with my project... :-(
>
> Thank you in advance for any suggestions or informations,
> Best regards,
> Adam.
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
update custom control during Design time --== Alain ==-- Microsoft C# .NET 1 17th Feb 2007 12:15 PM
Custom Control - Design Time Support =?Utf-8?B?U2ltb24=?= Microsoft ASP .NET 0 24th Jan 2007 09:51 PM
strange design-time control behavior George Hardy IV Microsoft VB .NET 3 18th Jun 2005 06:08 PM
Custom Control Properties at Design Time =?Utf-8?B?RGVubmlz?= Microsoft VB .NET 2 7th Nov 2004 12:40 AM
Using Table control in a custom composite control. Control does not render properly in design time. jb_in_marietta@yahoo.com Microsoft ASP .NET 0 1st Jul 2003 10:26 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:56 AM.