Quantcast
Viewing all articles
Browse latest Browse all 27039

VS 2012 Relocating groupbox based on selection

Code:

Private Sub CmbTieSize_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmbTieSize.SelectedIndexChanged
        LblTieColorDisplay.Text = CmbTieSize.SelectedValue.ToString

        If CmbTieSize.Text = "FTB6" OrElse CmbTieSize.Text = "FTY8" OrElse CmbTieSize.Text = "FTG10" Then
            GroupBox1.Height = "77"
            GroupBox2.Height = "77"
            GroupBox3.Height = "77"
            GroupBox3.Location = New Point(15, 195)
            Me.Height = "360"
        Else
            GroupBox1.Height = "44"
            GroupBox2.Height = "44"
            GroupBox3.Height = "44"
            GroupBox3.Location = New Point(15, 162)
            Me.Height = "275"
        End If
    End Sub

When I added this snippet of code "GroupBox3.Location = New Point(15, 162)" and "GroupBox3.Location = New Point(15, 195)" to a different location on a form, the groupbox3.height="44" or groupbox3.height="77" no longer resizes. Why? Hope I explained that correctly. Thanks.

Viewing all articles
Browse latest Browse all 27039

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>