Click here to Skip to main content
15,893,588 members
Home / Discussions / C#
   

C#

 
GeneralRe: Clipboard problem Pin
CodeItWell22-Aug-07 13:00
CodeItWell22-Aug-07 13:00 
Questionreading a string from a txt file & insert it in a database table? Pin
starist22-Aug-07 11:22
starist22-Aug-07 11:22 
AnswerRe: reading a string from a txt file & insert it in a database table? Pin
snorkie22-Aug-07 11:38
professionalsnorkie22-Aug-07 11:38 
AnswerRe: reading a string from a txt file & insert it in a database table? [modified] Pin
WhiteGirl2322-Aug-07 23:08
WhiteGirl2322-Aug-07 23:08 
QuestionListbox and the groupbox relationship Pin
Blubbo22-Aug-07 10:31
Blubbo22-Aug-07 10:31 
AnswerRe: Listbox and the groupbox relationship Pin
Ravi Bhavnani22-Aug-07 10:44
professionalRavi Bhavnani22-Aug-07 10:44 
AnswerRe: Listbox and the groupbox relationship Pin
Luc Pattyn22-Aug-07 13:03
sitebuilderLuc Pattyn22-Aug-07 13:03 
GeneralRe: Listbox and the groupbox relationship Pin
ChrisKo23-Aug-07 7:23
ChrisKo23-Aug-07 7:23 
Or you could wire up a ListBox and a TabControl to solve this problem.

public partial class Form1 : Form
	{
		public Form1()
		{
			InitializeComponent();
			this.tabControl1.Region = new Region(new RectangleF(this.tabPage1.Left, this.tabPage1.Top, this.tabPage1.Width, this.tabPage1.Height));
		}

		private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
		{
			if (((ListBox)sender).SelectedIndex == 0)
				tabControl1.SelectTab(0);
			else
				tabControl1.SelectTab(1);
		}
	}


I'm using the region setting to hide the TabPage selections from the UI, so the ListBox can be used to control the TabPage display. Obviously, you migth have more than two TabPages, so you'd need to change the listBox1_SelectedIndexChanged() event to control your TabPages as you need.

I hope that helps.
QuestionReplication Pin
Assaf8222-Aug-07 9:34
Assaf8222-Aug-07 9:34 
QuestionC# VS VB Pin
Assaf8222-Aug-07 8:34
Assaf8222-Aug-07 8:34 
AnswerRe: C# VS VB Pin
kubben22-Aug-07 8:38
kubben22-Aug-07 8:38 
GeneralRe: C# VS VB Pin
Assaf8222-Aug-07 9:03
Assaf8222-Aug-07 9:03 
GeneralRe: C# VS VB Pin
kubben22-Aug-07 9:07
kubben22-Aug-07 9:07 
AnswerRe: C# VS VB Pin
kubben22-Aug-07 8:39
kubben22-Aug-07 8:39 
GeneralRe: C# VS VB Pin
Assaf8222-Aug-07 9:19
Assaf8222-Aug-07 9:19 
GeneralRe: C# VS VB Pin
Giorgi Dalakishvili22-Aug-07 9:21
mentorGiorgi Dalakishvili22-Aug-07 9:21 
GeneralRe: C# VS VB Pin
kubben22-Aug-07 9:22
kubben22-Aug-07 9:22 
GeneralRe: C# VS VB Pin
Christian Graus22-Aug-07 12:54
protectorChristian Graus22-Aug-07 12:54 
GeneralRe: C# VS VB Pin
kubben23-Aug-07 2:16
kubben23-Aug-07 2:16 
AnswerRe: C# VS VB Pin
Thomas Stockwell25-Aug-07 2:58
professionalThomas Stockwell25-Aug-07 2:58 
QuestionTexts in all combo boxes are selected Pin
AndrusM22-Aug-07 7:38
AndrusM22-Aug-07 7:38 
QuestionRe: Texts in all combo boxes are selected Pin
J$22-Aug-07 13:19
J$22-Aug-07 13:19 
AnswerRe: Texts in all combo boxes are selected Pin
AndrusM22-Aug-07 23:14
AndrusM22-Aug-07 23:14 
QuestionHow to know the fact that desktop in changed? Pin
dhami_naresh22-Aug-07 7:37
dhami_naresh22-Aug-07 7:37 
AnswerRe: How to know the fact that desktop in changed? Pin
snorkie22-Aug-07 11:53
professionalsnorkie22-Aug-07 11:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.