Group Box on top

Please support our VB.NET advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Nov 2009
Posts: 3
Reputation: tiscood is an unknown quantity at this point 
Solved Threads: 0
tiscood tiscood is offline Offline
Newbie Poster

Group Box on top

 
0
  #1
Nov 9th, 2009
Hi all,

New user here using VB .Net 2008

I seem to be having trouble getting group boxes to appear when I click a radio button.

For example:
  1. If radiobutton1.Checked Then
  2. Groupbox1.Visible = True
  3. Groupbox2.Visible = False
  4. Groupbox3.Visible = False
  5. Groupbox4.Visible = False
  6. End If

This indeed brings up the first radio button however I have other groupboxes underneath which with the same code will not appear when the radio button is checked.

Eg:

  1. If radiobutton2.Checked Then
  2. Groupbox2.Visible = True
  3. Groupbox1.Visible = False
  4. Groupbox3.Visible = False
  5. Groupbox4.Visible = False
  6. End If

The second groupbox does not appear and is directly behind the first groupbox.

The
  1. .Top
code doesn't seem to be working either.

If anyone could shed some light on this I would really appreciate it.

Thanks!
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 321
Reputation: TomW is on a distinguished road 
Solved Threads: 45
TomW TomW is offline Offline
Posting Whiz
 
0
  #2
Nov 9th, 2009
It sounds as if, the groupboxes 2-4 are contained within the first groupbox container... If you move groubbox1 around on the form, does all the other groupboxes move with it?
Reply With Quote Quick reply to this message  
Join Date: Nov 2009
Posts: 3
Reputation: tiscood is an unknown quantity at this point 
Solved Threads: 0
tiscood tiscood is offline Offline
Newbie Poster
 
0
  #3
Nov 9th, 2009
Hi Tom,

I got this fixed earlier. You are right, they were merging together. I found it quite difficult to fix as they kept linking so I had to put the group boxes slightly out of order to fix this which I am not happy with but it seems to be the only solution.

Thanks again
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 321
Reputation: TomW is on a distinguished road 
Solved Threads: 45
TomW TomW is offline Offline
Posting Whiz
 
0
  #4
Nov 9th, 2009
Without using the mouse to move the group boxes, assign them all the same location in the properties window. This will position them on top of each other and should prevent them from becoming a child control.
Reply With Quote Quick reply to this message  
Join Date: Nov 2009
Posts: 3
Reputation: tiscood is an unknown quantity at this point 
Solved Threads: 0
tiscood tiscood is offline Offline
Newbie Poster
 
0
  #5
Nov 9th, 2009
Thanks Tom!
Reply With Quote Quick reply to this message  
Reply

Message:




Views: 356 | Replies: 4
Thread Tools Search this Thread



Tag cloud for VB.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC