Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inherit a control
Message
 
To
13/05/2005 09:34:14
General information
Forum:
ASP.NET
Category:
.NET Compact Framework
Miscellaneous
Thread ID:
01013626
Message ID:
01013907
Views:
36
Bonnie,
Acctually when I add the control to the toolbox in the compact framework IDE it is grayed out (disabled) and I can't select it to add it to my design surface, and that is why I just added a different (standard) control to the form and changed the initialization and declaration in code to use my custom control. If that makes sense. I have done that in a regular PC app setting if I am too lazy to add the control to the toolbox :)

Einar
>Einar,
>
>You should be able to add this button class to the ToolBox (I assume the Compact Framework's IDE is similar, I have never used it) and drop it on your Form from the ToolBox, same as you can do for a regular WinForm (even though it sounds like you haven't been doing this).
>
>~~Bonnie
>
>
>
>>I created a very simple class:
>>
>>using System;
>>
>>namespace SmartDeviceApplication1
>>{
>>	/// <summary>
>>	/// Summary description for Class1.
>>	/// </summary>
>>	public class Class1:System.Windows.Forms.Button
>>	{
>>		public Class1()
>>		{
>>			//
>>			// TODO: Add constructor logic here
>>			//
>>			base.BackColor = System.Drawing.Color.Red;
>>		}
>>	}
>>}
>>
>>
>>Now I want to use my new button (Class1) in my PPC app. So I add a standard button to the designer and change the System.Windows.Forms.Button to Class1 in the code (when creating a PC app I am used to this working). When I go back to the designer the button is gone and if I build the app and run the exe the button is there and is indeed red.
>>
>>I guess there should be a question in here: How can I inherit from a control and use the new inherited control in my PPC app?
>>I did the same thing in a PC app and the button turned red in the designer and did not disapear.
>>
>>And help/information would be appreciated.
>>
>>Thanks,
>>Einar
Semper ubi sub ubi.
Previous
Reply
Map
View

Click here to load this message in the networking platform