473,395 Members | 1,404 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,395 software developers and data experts.

Text property and the Toolbox


I have created a label control and got it to appear in the toolbox. The problem I have is that while all the other
properties appear for the contro I can't get the Text property to appear at all. I have tried in both the DataBindings
category and the Appearance category but it won't appear in either. Am I missing something or do I have to do something
extra for the Text property?

I have included the part of the code which seems relevant. Does anyone have any idea what I am doing wrong?

Thanks, Steve

public class ThreeDLabel : System.Windows.Forms.UserControl
{
private System.ComponentModel.Container components = null;

private string m_Text = "Initial String";
private Font m_Font = new Font("Arial", 20, FontStyle.Bold);

[Category("DataBindings")]
[Description("Control text")]
//Override the base Text Property
public override string Text
{
get
{
return m_Text;
}
set
{
m_Text = value;
this.Refresh();
}
}
[Category("Appearance")]
[Description("Sets the Font for the Text property")]

public Font TextFont
{
get
{
return m_Font;
}
set
{
m_Font = value;
this.Refresh();
}
}

etc.
Nov 17 '05 #1
2 2999
This is related to attribute inheritance.
http://www.google.ca/groups?hl=en&lr...TNGP15.phx.gbl

--
Tim Wilson
..Net Compact Framework MVP

"steve bull" <bu****@comcast.net> wrote in message
news:hp********************************@4ax.com...

I have created a label control and got it to appear in the toolbox. The problem I have is that while all the other properties appear for the contro I can't get the Text property to appear at all. I have tried in both the DataBindings category and the Appearance category but it won't appear in either. Am I missing something or do I have to do something extra for the Text property?

I have included the part of the code which seems relevant. Does anyone have any idea what I am doing wrong?
Thanks, Steve

public class ThreeDLabel : System.Windows.Forms.UserControl
{
private System.ComponentModel.Container components = null;

private string m_Text = "Initial String";
private Font m_Font = new Font("Arial", 20, FontStyle.Bold);
[Category("DataBindings")]
[Description("Control text")]
//Override the base Text Property
public override string Text
{
get
{
return m_Text;
}
set
{
m_Text = value;
this.Refresh();
}
}
[Category("Appearance")]
[Description("Sets the Font for the Text property")]

public Font TextFont
{
get
{
return m_Font;
}
set
{
m_Font = value;
this.Refresh();
}
}

etc.

Nov 17 '05 #2

Thanks, it worked fine.

On Fri, 25 Mar 2005 18:53:14 -0500, "Tim Wilson" <TIM(UNDERSCORE)WILSON(AT)ROGERS(PERIOD)COM> wrote:
This is related to attribute inheritance.
http://www.google.ca/groups?hl=en&lr...TNGP15.phx.gbl


Nov 17 '05 #3

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

Similar topics

1
by: Daniel Hill | last post by:
OK, I have very, VERY basic background knowledge of VB6 and have now upgraded to VB.NET and now I'm struggling to bring up the forms I want. What I am looking to do is to have a click a command...
2
by: steve bull | last post by:
I have created a label control and got it to appear in the toolbox. The problem I have is that while all the other properties appear for the contro I can't get the Text property to appear at all. I...
1
by: Vinod I | last post by:
Hi Team, I made a custom validator control which is having 2 public properties. But after making dll & adding that to the ToolBox, I could not able to find these properties in Property Box. ...
0
by: Sanjay Pais | last post by:
This is an extension of an earlier post I have created a custom text box and compiled it and dropped it into my toolbox. However when I change the value of my custom property in design mode and...
5
by: DCSTech | last post by:
On my webpage I have a textbox. I would like to be able to change the text in the textbox and via a pushbutton have the value in the textbox written to the .text property so that next time the...
7
by: ChrisUttenreither | last post by:
Hello folks. I'm writing a Roguelike game in C#. Fun stuff. The game includes a map that is made entirely of colored ASCII art in a monospace font. I would like to make this map a control in...
2
by: cashdeskmac | last post by:
Hi, I have create an inherited control (a TextBox which doesn't accept numbers) and have added it to my toolbox. Can anyone give pointers on how to set the Text to "" when an instance of this...
4
by: Dennis K. | last post by:
I created a new VB.NET Windows Application and dragged a Microsoft MaskedEditBox onto the empty form (did not change any of the defaults). In Form1_Load I added the line... AxMaskEdBox1.Text =...
7
by: Eric Wertman | last post by:
I have a set of files with this kind of content (it's dumped from WebSphere): ]
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.