TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Vashishtha
NA
1
0
Tab page not responding
Sep 29 2008 5:35 AM
Everything happens OKEY DOKEY, the tab page is created, renamed and text is added to it. Have a look at this code-
private void button1_Click(object sender, EventArgs e)
{
War = new TabPage();
tabControl1.Controls.Add(War);
War.Text = "WAR";
}
private void War_Click(object sender, EventArgs e)
{
this.War.Controls.Add(this.dlabel[i]);
int x, y;
x = 200;
y = 200;
for (i = 0; i < dcount; i++)
{
dlabel[i].Visible = true;
dlabel[i].Location = new Point(x, y);
dlabel[i].Size = new Size(dlabel[i].PreferredWidth, dlabel[i].PreferredHeight);
dlabel[i].Text = "Destroyer";
x += 50;
}
}
Previously when i clicked the tabpage5(on my last post), the labels showed up(Please there is nothing wrong with the labels, they work just fine). Ive also added the tab page 'War' in my Form1 class-
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private game.destroyer[] dr = new game.destroyer[count];
private game.carrier[] cr = new game.carrier[count];
private game.submarine[] sr = new game.submarine[dcount];
private System.ComponentModel.IContainer components = null;
private System.Windows.Forms.Label[] dlabel = new System.Windows.Forms.Label[count];
private System.Windows.Forms.TabPage War = new System.Windows.Forms.TabPage();
The problem is that when i click the tab page, nothing happens.
Reply
Answers (
0
)
To display a message box while using a timer control
How to display words list in textbox on search botton.....c# windows application?