Current location: Hot Scripts Forums » Programming Languages » Windows .NET Programming » Select radioButton, switch panel in C#/.net


Select radioButton, switch panel in C#/.net

Reply
  #1 (permalink)  
Old 06-22-06, 08:42 PM
bscsGrad bscsGrad is offline
New Member
 
Join Date: Jun 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Select radioButton, switch panel in C#/.net

Hello All,

I am working on a capstone project. Part of it is to create a web page using C# in MS Visual Studio 2003 (.Net framework).

I have several tabs. Each tab has two panels (left and right). The left panel contains a number of radioButtons. The right panel contains stacked panels of the appropriate information for each radioButton.

I am stuck trying to write code to display the right panel's information based on which radioButton is selected on the left panel.
Should I be using DataBinding?

Right now, I click the radioButtons on the left panel, but the right panel does not change.

Here is part of the code of things I have tried (that have not worked). Most of it dittos for each panel and radioButton:

//radioButton1private void radioButton1_CheckedChanged(object sender, System.EventArgs e)
{
}
//panel2
private void panel2_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
}
//this is my pseudocode logic of what I want to happen
if (radioButton1.Checked == true)
{ panel2.Visible = true;//and all other panels are not visible}
else
panel2.Visible = false; //or some text message or blank panel or some default

I found this somewhere. Will this help?
//radioButton3.Attributes.Add("onclick", panel4.Visible = true);
Reply With Quote
  #2 (permalink)  
Old 06-22-06, 10:48 PM
digioz's Avatar
digioz digioz is offline
Community VIP
 
Join Date: Oct 2003
Location: Chicago, IL
Posts: 2,171
Thanks: 3
Thanked 9 Times in 9 Posts
Its kind of hard to visualize what you are trying to do. Do you have a screenshot or a URL to a web page that we can look at? That would definitely help.
__________________
Reply With Quote
  #3 (permalink)  
Old 06-22-06, 11:16 PM
bscsGrad bscsGrad is offline
New Member
 
Join Date: Jun 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Buttons and Panels

I did a quick WordArt pic of what I'm trying to do.

Basically, when I click a radioButton in the left panel (panel1), I want the appropriate information to be visible in the right panel (panel2, panel3, panel4, etc).
Attached Files
File Type: doc ButtonsPanels.doc (26.5 KB, 617 views)
Reply With Quote
  #4 (permalink)  
Old 08-22-06, 04:04 AM
amcasperforu amcasperforu is offline
New Member
 
Join Date: Aug 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Hi bscsGrad

If you could still remember about your question about tabcontrol with radio button on the left side then display on the right side the contents of its respective radio buton???

I do have same problem, would you mind sending me your research on how you do it?

Here's my email address amcasperforu@yahoo.com

Thanks,

Casper
Reply With Quote
  #5 (permalink)  
Old 08-22-06, 08:31 PM
bscsGrad bscsGrad is offline
New Member
 
Join Date: Jun 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Casper,

Sorry, I never figured out how to make the panels work.
I ended up having to hard-code that part of the project.
__________________
[FONT=Impact][SIZE=4][COLOR=Blue]bscsGrad
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Free windows hosting contorl panel parsv ASP 0 09-10-05 03:54 AM
Forms help input box switch to Select box dstran JavaScript 1 04-19-05 12:17 AM
Multiple Select phppick JavaScript 3 04-11-05 12:09 AM
Select List insert into DB The Omega JavaScript 1 01-12-05 12:51 PM
i have 3 select box this is urgent traceMe JavaScript 0 12-02-03 01:24 AM


All times are GMT -5. The time now is 02:16 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.