Link to home
Start Free TrialLog in
Avatar of ISC
ISC

asked on

Forms, and group boxes laying

Hi,

I have one form with four group boxes on, each group box has its own set of controls. The group boxes are layered over each other and by default when the form is displayed the first group box is visable and the rest are hidden...

When the user clicks on a "next" button the first group box is visible = false and the second group box is visable= true....

My issue is that when the group boxes are overlapped and I click on "next" to display the seond group box it never gets displayed I am not sure why....

Any thoughts...?




Private Sub btn_next_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_next.Click
 
        Me.btn_start.Enabled = False
 
        If (Me.grp_screen1_startdate.Visible = True) Then
 
            Me.grp_screen1_startdate.Visible = False
            Me.grp_screen2_funds.BringToFront()
            Me.btn_back.Enabled = True
 
        ElseIf (Me.grp_screen2_funds.Visible = True) Then
 
            Me.grp_screen2_funds.Visible = False
            Me.grp_screen3_curr.Visible = True
 
        ElseIf (Me.grp_screen3_curr.Visible = True) Then
 
            Me.grp_screen3_curr.Visible = False
            Me.btn_next.Enabled = False
            Me.grp_screen4_process.Visible = True
            Me.btn_start.Enabled = True
 
        End If
 
    End Sub

Open in new window

Avatar of ISC
ISC

ASKER

Sorry a correction to the code...

Private Sub btn_next_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_next.Click

        Me.btn_start.Enabled = False

        If (Me.grp_screen1_startdate.Visible = True) Then

            Me.grp_screen1_startdate.Visible = False
            Me.grp_screen2_funds.Visible = True
            Me.btn_back.Enabled = True

        ElseIf (Me.grp_screen2_funds.Visible = True) Then

            Me.grp_screen2_funds.Visible = False
            Me.grp_screen3_curr.Visible = True

        ElseIf (Me.grp_screen3_curr.Visible = True) Then

            Me.grp_screen3_curr.Visible = False
            Me.btn_next.Enabled = False
            Me.grp_screen4_process.Visible = True
            Me.btn_start.Enabled = True

        End If

    End Sub
Avatar of ISC

ASKER

I think it is something to do with the layering of group boxes over each other...
Avatar of ISC

ASKER

I have sorted it, when I layered the groups boxes over each other they became a group box whithin a group box....

I have resolved by View=>Other Winodws=>Dcoument Outline and ensuing there is no groupbox within another groupbox...

Issue solved..
ASKER CERTIFIED SOLUTION
Avatar of EE_AutoDeleter
EE_AutoDeleter

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial