Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Groupbox problem

Groupbox problem

Scheduled Pinned Locked Moved Visual Basic
helpquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cstrader232
    wrote on last edited by
    #1

    If my 2 group boxes are next to each other on the form, all is well. If the 2 group boxes are one on top of each other, however, the button2 code doesn't work. Groupbox1 is hidden, but Groupbox2 never shows. Anyone had this problem? Is there a way to put the groupboxes on top of each other and show/hide them properly? Thanks Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click GroupBox1.Show() GroupBox2.Hide() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click 'GroupBox1.SendToBack() GroupBox1.Hide() GroupBox2.Show() 'GroupBox2.BringToFront() End Sub

    J 1 Reply Last reply
    0
    • C cstrader232

      If my 2 group boxes are next to each other on the form, all is well. If the 2 group boxes are one on top of each other, however, the button2 code doesn't work. Groupbox1 is hidden, but Groupbox2 never shows. Anyone had this problem? Is there a way to put the groupboxes on top of each other and show/hide them properly? Thanks Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click GroupBox1.Show() GroupBox2.Hide() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click 'GroupBox1.SendToBack() GroupBox1.Hide() GroupBox2.Show() 'GroupBox2.BringToFront() End Sub

      J Offline
      J Offline
      JoeSharp
      wrote on last edited by
      #2

      hi have you try to use GroupBox1.Visible = True/False instead of Hide()/Show()? regards

      C 1 Reply Last reply
      0
      • J JoeSharp

        hi have you try to use GroupBox1.Visible = True/False instead of Hide()/Show()? regards

        C Offline
        C Offline
        cstrader232
        wrote on last edited by
        #3

        Yes, tried that too. There's something odd about groupboxes. Even in the form editor, if you drag them on top of each other they tend to disappear. Other controls don't do that. I'm thinking it's a bug perhaps, but I can't find a workaround.

        R 1 Reply Last reply
        0
        • C cstrader232

          Yes, tried that too. There's something odd about groupboxes. Even in the form editor, if you drag them on top of each other they tend to disappear. Other controls don't do that. I'm thinking it's a bug perhaps, but I can't find a workaround.

          R Offline
          R Offline
          Rekless
          wrote on last edited by
          #4

          I am trying to create an "options" screen for my program in which i have a treeview on the left and a when you select a node in the treeview the corresponding groupbox will show on the right with the settings for that category. The problem I am running into is the groupboxes embed themselves into one another when you put them on top of one another. I need like 10 of them on top of each other and this is really frustrating me. I have tried locking the groupboxes, but that does not work. I noticed you have to place them just right (just offset of the one below it) or they embed. Of course the groupbox has border lines you can't get rid of so you see them moving as you make your way thru the treeview. Not good! Like you state above, the groupbox will not appear. I am guessing this is because it is now embedded into the groupbox below where it was placed.

          modified on Sunday, January 3, 2010 8:38 PM

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups