Radio Button Group Problem


Author
Message
Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
I am using a radio button group and I set it to have 5 radio button count. I set the BO to none since I am supplying the text for the radio buttons. I run it load the form and it looks good. I run it the second time and go back to edit it and all of a sudden I have 7, 9, 13 buttons filled in automatically and showing up on top of each other as the picture shows? I have even uninstalled, downloaded latest version are reinstalled and I get the same thing. 
What could it possibly be? 
TIA.
Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
OP's I forgot the picture.
Attachments
radiobuttongroup.png (111 views, 4.00 KB)
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hi Terry.

Could you reproduce this on a small sample and attach it here?
Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
I just tried it on a simple form in my project and the attached pictures show the weirdness. This is after I ran my form twice and went back to edit it?

This happened after no intervention by me other than running the form. 

I am going to try on a separate project.

Attachments
rbtncount1.png (107 views, 3.00 KB)
rbtncount2.png (117 views, 3.00 KB)
rbtncountform.png (114 views, 13.00 KB)
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Got it. As soon as you get it happening on your simple project, post it here so we can test it together.
Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
Well I found out what it is I think.
I created a subclass of a button for exiting a form.

Imports System.Drawing
Imports System.ComponentModel
'Imports MicroFour.StrataFrame.Business
Imports MicroFour.StrataFrame.UI.Collections


''' <summary>
''' My Button class.  I will use this class to exit a form.
''' </summary>
''' <remarks></remarks>
<ToolboxBitmap(GetType(System.Windows.Forms.Button))>
Public Class myExitButton
    Inherits MicroFour.StrataFrame.UI.Windows.Forms.Button

    Public Sub New()
        MyBase.New()
        'Me.Width = 23
        'Me.Height = 32
        'Me.Text = "Exit"
    End Sub

    Protected Overrides Sub OnClick(ByVal e As System.EventArgs)
        MyBase.OnClick(e)
        ' Simply Want to Close the Form The Following Works but the following is more generic
        ' Parent.Dispose()

        Dim parentform As Form = Me.GetParentForm()
        If parentform IsNot Nothing Then
            parentform.Close()
        End If


    End Sub

    Protected Overrides Sub oncreatecontrol()
        MyBase.OnCreateControl()
        Me.Width = 75
        Me.Height = 23
        Me.Text = "Exit"
    End Sub

    Private Function GetParentForm() As Object
        ' return var
        Dim parentform As Form = Nothing
        Dim ctl1 As Control = Me.Parent

        If TypeOf ctl1 Is Form Then
            parentform = DirectCast(ctl1, Form)
            Return parentform
        End If

        Do
            ctl1 = Me.GetNextControl(ctl1, True)

            If ctl1 IsNot Nothing Then
                ' Search for Form
                If TypeOf ctl1 Is Form Then
                    parentform = DirectCast(ctl1, Form)
                End If

            End If

        Loop Until ctl1 Is Nothing

        Return parentform

    End Function


    ' The Following would probably work if you wanted to put the Parent Form in a Property
    '    Public Class closebutton
    'imports System.Windows.Forms.Button

    '        Private _parentForm As System.Windows.Forms.Form

    '        '' <summary>
    '        ''' Defines.
    '        ''' </summary>
    '        Public Property ParentForm() As System.Windows.Forms.Form
    '            Get
    '                Return _parentForm
    '            End Get
    '            Set(ByVal value As System.Windows.Forms.Form)
    '                _parentForm = value
    '            End Set
    '        End Property

    '        Protected Overrides Sub OnCreateControl()
    '            MyBase.OnCreateControl()

    '            Me.Text = "Close"
    '            Me.Width = 75
    '            Me.Height = 23
    '        End Sub

    '        Protected Overrides Sub OnClick(ByVal e As EventArgs)
    '            MyBase.OnClick(e)

    '            '-- Close the form if its set.
    '            If Me.ParentForm IsNot Nothing Then
    '                Me.ParentForm.Close()
    '            End If
    '        End Sub

    '    End Class





End Class

As Soon as I put it on the form to exit the weird stuff happens. I have used this on 9 or 10 forms before and nothing happened with Radiobuttongroups. Why all of a sudden???


Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
Wow. Greg helped me develop one also(exit button) that required a form name as an input and now it is doing the same thing.
Imports System.Drawing
Imports System.ComponentModel
'Imports MicroFour.StrataFrame.Business
Imports MicroFour.StrataFrame.UI.Collections
Imports System.Windows.Forms.Button

''' <summary>
''' My Button class.  I will use this class to exit a form.
''' </summary>
''' <remarks></remarks>
<ToolboxBitmap(GetType(System.Windows.Forms.Button))>
Public Class myExitButton2
    Inherits MicroFour.StrataFrame.UI.Windows.Forms.Button

    Private _parentForm As System.Windows.Forms.Form

    Public Property ParentForm() As System.Windows.Forms.Form
        Get
            Return _parentForm
        End Get
        Set(ByVal value As System.Windows.Forms.Form)
            _parentForm = value
        End Set
    End Property

    Protected Overrides Sub OnCreateControl()
        MyBase.OnCreateControl()
        Me.Text = "Close"
        Me.Width = 75
        Me.Height = 23
    End Sub

    Protected Overrides Sub OnClick(ByVal e As EventArgs)
        MyBase.OnClick(e)

        '-- Close the form if its set.
        If Me.ParentForm IsNot Nothing Then
            Me.ParentForm.Close()
        End If
    End Sub


Imports MicroFour.StrataFrame.UI.Collections
The above line is also not correct now?

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Could you reproduce this same thing on a simple sample?

About the Imports line, if this was what you were asking last, I can't see anything wrong with it.
Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
Yes even on a simple form both classes create the same problem.

Yes the import has a squiggly line underneath it.
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Have you added the MicroFour StrataFrame UI reference into your project?
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search