473,403 Members | 2,071 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,403 software developers and data experts.

New Label invisible?

Dear friends

Why is this label invisible:
Dim myLbl As New Label
myLbl.BorderStyle = BorderStyle.FixedSingle
myLbl.BackColor = Color.White
myLbl.ForeColor = Color.Black
myLbl.Size = New Size(100, 23)
myLbl.Location = New Point(5, 5)
myLbl.Visible = True
myLbl.Text = "Testing"

Regards Able
Nov 20 '05 #1
2 1300
In article <4N*******************@news2.e.nsc.no>, ab**@epost.no says...
Dear friends

Why is this label invisible:
Dim myLbl As New Label
myLbl.BorderStyle = BorderStyle.FixedSingle
myLbl.BackColor = Color.White
myLbl.ForeColor = Color.Black
myLbl.Size = New Size(100, 23)
myLbl.Location = New Point(5, 5)
myLbl.Visible = True
myLbl.Text = "Testing"


Did you add it to the Form?

Controls.Add(myLbl)

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele
Nov 20 '05 #2
* "Able" <ab**@epost.no> scripsit:
Why is this label invisible:
Dim myLbl As New Label
myLbl.BorderStyle = BorderStyle.FixedSingle
myLbl.BackColor = Color.White
myLbl.ForeColor = Color.Black
myLbl.Size = New Size(100, 23)
myLbl.Location = New Point(5, 5)
myLbl.Visible = True
myLbl.Text = "Testing"


\\\
Me.Controls.Add(myLbl)
///

When creating more than one controls and adding them to the form, you
may want to use 'Me.Controls.AddRange' and/or combined with
'Me.SuspendLayout' and 'Me.ResumeLayout'.

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

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

Similar topics

2
by: Jim | last post by:
I have a report that needs disclamers at the bottom of each page except the first two. The discamer is in the form of a label in the page footer. I tried adding this line to the page footer...
7
by: Jared | last post by:
Here is my situation. I have multiple labels on a form but only certain ones will become visible while using the form. Depending on which check box(s) you pick, on another form, determines the...
4
by: Gibs | last post by:
Hi, How can i make a label visible/invisible? I am able to do it for text box by using document.form1.TextBox1.style.visibility="hidden"; But when i am giving the same for the label, i am getting...
3
by: Kevin Cunningham | last post by:
I have a repeater with some labels in it (code below). For whatever reason the text for the label is not persisted in viewstate on the postback. Is there a trick to get this to work? Is there...
3
by: rockdale | last post by:
Hi, All: I have a datagrid with TemplateColumn as following: <asp:TemplateColumn Visible="False" > <ItemStyle Width="0px"></ItemStyle> <ItemTemplate> <asp:Label id="lblMin_Value"...
3
by: Cas | last post by:
Hi, I want to display a label a few seconds, then make it invisible. I tried with for next, but it doesn't work. Thanks for help Cas
1
by: rn5a | last post by:
A ASPX page has a RadioButtonList with 2 ListItems - 'Yes' & 'No' <form runat="server"> <asp:RadioButtonList ID="rdlAdd" OnSelectedIndexChanged="ShowHide" AutoPostBack="true" runat="server">...
3
by: Mufasa | last post by:
Is there any real difference between using a hidden field and using a label that is not visible. My thought being that I could leave the labels visible while testing but make them invisible once...
8
fayazmd
by: fayazmd | last post by:
Hi, I am stuck with a problem on labels. I have 30 labels on my from. And from one method i am returning a value, based on it i have to make one label as invisible. I took switch - case, but i...
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: 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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.