473,379 Members | 1,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

some attributes don't work for custom controls

Hi,

I'm developing a customcontrol and try to add some design-time support for
my control by using attributes.

Unfortunately only the 'CategoryAttribute' works well when I drag my control
on a client-form and open the properties-window for the control
'DefaultProperty', 'ToolboxBitmap', 'DefaultValue' do not work properly
<DefaultProperty("MyMAXSTATE"), _
ToolboxBitmap(GetType(MyCounterboxCustomControl), "CustomControl.ico")> _
Public Class MyCounterboxCustomControl
Inherits System.Windows.Forms.Control

.....

<CategoryAttribute("MIN-MAX"), DefaultValue(5)> _
Public Property MyMAXSTATE() As Byte
Get
Return m_bMAXSTATE
End Get
Set(ByVal Value As Byte)
m_bMAXSTATE = Value
Invalidate()
End Set
End Property
End Class

thanks for any help

Chris
Nov 20 '05 #1
1 985
* "Christian" <ch***************@pandora.be> scripsit:
I'm developing a customcontrol and try to add some design-time support for
my control by using attributes.

Unfortunately only the 'CategoryAttribute' works well when I drag my control
on a client-form and open the properties-window for the control
'DefaultProperty', 'ToolboxBitmap', 'DefaultValue' do not work properly


Please be more specific. What doesn't work. What would you expect to
occur?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Kunle Odutola | last post by:
I have a database that tracks players for children's sports clubs. I have included representative DDL for this database at the end of this post. A single instance of this database supports...
2
by: Paul Dunstone | last post by:
Hi group I am trying to add a custom attribute to all .NET elements such as textboxes, labels, datagrids etc. I want to add an attribute called 'key'. I already have the code working for the...
6
by: A.M | last post by:
Hi, I am trying to grasp a better underestanding of C# Attributes . I don't see them as a very usefull capability. Could anyone refer me to resources show me best practices and how can I...
3
by: Ken Varn | last post by:
I am just starting the process of creating ASP.NET server controls. I have created controls for .NET applications, but have just started with ASP.NET. I am a little confused about some areas that...
1
by: Sanjay Pais | last post by:
I built a custom control for all the basic web.ui.controls like textbox, label, checkbox etc etc. I added my custom attribute called ApplySecurity to the html in the page. However, when I cycle...
4
by: ThunderMusic | last post by:
Hi I want to do just like in the subject ... to have some text and tags between the start and end tags of my user-control. Is there a simple way of doing that? for instance, between the tags,...
0
by: matrix1975 | last post by:
Hi everybody, I'm migrating my ASP.NET 1.1 portal to 2.0. In my previous version I had implemented a data binding framework for the presentation layer. Basically a property of a Business Object...
3
by: Nathan Sokalski | last post by:
I want to add attributes to my custom controls that are not of type String. I know how to convert from a String to the different types that I want, but when the user assigns values to the...
3
by: Tom | last post by:
Hi, At design time I am adding attributes to my controls (too detailed to get into) with warnings (Warning 9 Validation (ASP.Net): Attribute 'ProductID' is not a valid attribute of element...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.