CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 4/9/2004 12:08:01 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 54 Favorited: 0 Favorite
4 Items, 1 Pages 1 |< << Go >> >|
FancyKetsup
Asp.Net User
Property Browser in VS with custom Control4/9/2004 12:08:01 AM

0/0

I have a composite server control and I am trying to allow for the setting of properties from the property browser in VS at design-time. That?s all fine and dandy BUT.... The light just isn't going off on setting the Default Property and just how this default value is set in the property browser of VS. See code below...

protected Color tabBackColor = Color.Empty;
[Category("Tab")]
[DefaultValue("Black")]
public Color TabBackColor {get{return tabBackColor;} set{tabBackColor = value;}}


Now this will throw an error when I try to reset to the default value because the default value isn't a Color type. How is this situation handled? Furthermore I can't seem to figure out how to set the default value to a type of Color.
Answering a question increases your knowledge asking a question shows your Intelligence!
Bans.Net
Asp.Net User
Re: Property Browser in VS with custom Control4/9/2004 3:19:24 AM

0/0

>Furthermore I can't seem to figure out how to set the default value to a type of Color.

For this, may be you can create an object of type Color, assign it a value (Color value) and then pass this for the DefaultValue.

I am not sure whether this will help. Just give it a try.
FancyKetsup
Asp.Net User
Re: Property Browser in VS with custom Control4/9/2004 3:55:19 AM

0/0

Ok I can get the right-click functionailty in VisualStudio working if I don't declare a default value and use... void ResetTabBackColor(){tabBackColor =Color.Black;}. But I still don't understand how to use the attribute [DefaultValue(System.Drawing.Color."Black")] or even the string overload version... [DefaultValue(Black")] any attempts to declare a default value in this way messes up the right-click reset functionality of VS plus gives me and error can't convert type. I assume I must be missing something silly here anyone know the answer? TIA! It's sort of annoying having all the values show up BOLD in the property browser because I can't set a default value for color types. Whats the deal :(
Answering a question increases your knowledge asking a question shows your Intelligence!
master4eva
Asp.Net User
Re: Property Browser in VS with custom Control4/9/2004 8:55:07 AM

0/0

Look at the overloads -- it will show a whole lot more deal Paul:

[DefaultValue(typeof(Color), "Black")]

-- Justin Lovell
4 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Professional ASP.NET 2.0 Server Control and Component Development Authors: Shahram Khosravi, Pages: 1186, Published: 2006
Professional ASP.NET 2.0 Authors: Bill Evjen, Scott Hanselman, Farhan Muhammad, Srinivasa Sivakumar, Devin Rader, Pages: 1253, Published: 2005
Windows Forms Programming in C# Authors: Chris Sells, Pages: 681, Published: 2004
.NET Windows Forms Custom Controls: Forms Custom Controls Authors: Richard L. Weeks, Pages: 288, Published: 2002
Pro C# with .NET 3.0: exploring the .NET universe using curly brackets Authors: Andrew Troelsen, Pages: 1186, Published: 2007
Pro ASP. Net 3. 5 Server Controls and AJAX Components Authors: Rob Cameron, Dale Michalk, Pages: 740, Published: 2008
Practical C# Charts and Graphics: Advanced Chart and Graphics Programming for Real-world .net Applications Authors: Jack Xu, Anna Y Hsu, Pages: 572, Published: 2007
Professional ASP.NET 3.5: In C# and VB Authors: Bill Evjen, Scott Hanselman, Devin Rader, Pages: 1673, Published: 2008
Microsoft Visual C# .NET 2003 Developer's Cookbook: Developer's Cookbook Authors: Mark Schmidt, Simon Robinson, Pages: 787, Published: 2003
Sams Teach Yourself Visual C++ .NET in 24 Hours Authors: Richard J. Simon, Mark Schmidt, Pages: 413, Published: 2002

Web:
Aggregated Intelligence: Custom Control, Visual Studio Designer ... NET Property Browser(2002) http://msdn2.microsoft.com/en-us/library/Aa302334. aspx Custom Design-time Control Features in Visual Studio .NET (2003) ...
CodeProject: Visual Studio.NET Blank Property Browser Bug. Free ... Visual Studio.NET 2003 version's property browser goes blank, I found the remedy and ... Create custom dialogs for use in your Visual Studio Setup projects ...
Visual Studio Magazine Online | Getting Started: Leverage Custom ... If you're developing an application with VS.NET that uses this custom control, you'll find that the Property Browser lists all of the read/write properties. ...
Metadata Attributes for Custom Server Controls Associates a custom control builder with the control. .... In a visual designer such as Visual Studio, the property browser displays the description of the ...
InformIT: Visual C++.NET Control Class Libraries > Creating Custom ... Listing 23.3 Creating a Custom Control and Controlling Its Appearance in the Property Browser. 1: // ShapeControl.h 2: 3: #pragma once 4: 5: #using ...
Mooseworks Software - VS2005 Control Compact Framework Custom Control Design Support in Visual Studio 2005 ... In the Property Browser, we can go farther than that. In Visual Studio 2003, ...
Creating Custom Controls for Microsoft .NET Compact Framework in ... NET Compact Framework in Visual Studio 2005 Visual Studio 2005 fully supports .... Notice there is a “Custom Attribute” property in the property browser. ...
ASP - Visual Studio And Custom Controls Tutorials Visual Studio and Custom Controls. In this section, we'll build a simple ... single Text property, and it will render that Text property to the end browser. ...
Walkthrough: Developing and Using a Custom Server Control In some visual designers such as Visual Studio 2005, a custom control also .... In Visual Studio 2005, the property browser displays the description of the ...
Safari Books Online - 0672323338 - .NET Windows® Forms Custom Controls When it comes to custom control development, understanding how the Toolbox, Icon Tray, and Property Browser work is very important. ...

Videos:
Luxury Waterfront Townhome For Sale Near The Beach 3010 NE 49th St., Ft. Lauderdale Florida USA Luxurious Townhome On The Water in Ft. Lauderdale, Florida Near The Beach Offered By Pierre Shaheen of Sol Sotheby’s International Realty. This Town...
Luxury Waterfront Townhome Near The Beach For Sale 3010 NE 49th St., Ft. Lauderdale, Florida USA Luxurious Townhome On The Water in Ft. Lauderdale, Florida Near The Beach Offered By Pierre Shaheen of Sol Sotheby’s International Realty. This Town...
XML11: An Abstract Windowing Protocol Google TechTalks June 1, 2006 Arno Puder Arno Puder received his masters and Ph.D. in computer science and is currently working as an Assistant Prof...
Luxury Waterfront Townmhome Near the Beach For Sale 3010 NE 49th St., Ft. Lauderdale, Florida USA Luxurious Townhome On The Water in Ft. Lauderdale, Florida Near The Beach Offered By Pierre Shaheen of Sol Sotheby’s International Realty. This Town...
Luxury Waterfront Townhome For Sale Near the Beach 3010 NE 49th St., Ft. Lauderdale, FL USA Luxurious Townhome On The Water in Ft. Lauderdale, Florida Near The Beach Offered By Pierre Shaheen of Sol Sotheby’s International Realty. This Town...
Luxury Waterfront Townhome Near The Beach For Sale 3010 NE 49th St., Ft. Lauderdale Florida USA Luxurious Townhome On The Water in Ft. Lauderdale, Florida Near The Beach Offered By Pierre Shaheen of Sol Sotheby’s International Realty. This Town...
Luxury Waterfront Townhome Near the Beach For Sale 3010 NE 49th St., Ft. Lauderdale, Florida USA Luxurious Townhome On The Water in Ft. Lauderdale, Florida Near The Beach Offered By Pierre Shaheen of Sol Sotheby’s International Realty. This Town...
Luxury Waterfront Townhome Near the Beach 3010 NE 49th St., Ft. Lauderdale, FL USA Luxurious Townhome On The Water in Ft. Lauderdale, Florida Near The Beach Offered By Pierre Shaheen of Sol Sotheby’s International Realty. This Town...
Luxury Waterfront Townhome For Sale Near The Beach 3010 NE 49th St., Ft. Lauderdale, Florida USA Luxurious Townhome On The Water in Ft. Lauderdale, Florida Near The Beach Offered By Pierre Shaheen of Sol Sotheby’s International Realty. This Town...
Luxury Waterfront Townhome Near the Beach For Sale 3010 NE 49th St., Ft. Lauderdale Florida USA Luxurious Townhome On The Water in Ft. Lauderdale, Florida Near The Beach Offered By Pierre Shaheen of Sol Sotheby’s International Realty. This Town...




Search This Site:










more intelligent question

problem in timer function

help, how to get current control type dynamically and use it...

string[] type property has error in my control!! why?

requiredcheckboxlistvalidator

control initialization method or page_load??

good quality asp/.net/mssql hosting don't mine paying

how to create a custom design panel

any good controlbuilder examples?

clearing/discovering control events

urgent: composite control listbox viewstate problem

2003 server web edition ?

class exposed as property with multiple instances.

converting ascx to server control

composite control loses text over postback

how do you tell a good fast host?

how can i call a user control many times?

asp.net hosters with comparable specs.

directory question

accessing scroll bar property of div or span controls...

hide non-virtual property

inamingcontainer. (why unique names ????)

collection

login error with microsoft crm 3.0 for service providers

how to add a custom control to toolbox tab other than "general"

child lists (again i know)....

choose tables, fields from database in custom control at design time

viewstate in composite controls

simple control viewstate question

accessing the datagrid with vsz file

  Privacy | Contact Us
All Times Are GMT