StrataFrame Forum

Inherited BrowseDialog

http://forum.strataframe.net/Topic26688.aspx

By Alex Bibiano González - 3/29/2010

Hi all,



I have done a base BrowseDialog for my application inherited from MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialog. I have created the partial class MyBrowseDialog.cs and the MyBrowseDialog.Designer.cs file in order to use the Visual Studio designer to set properties on my BrowserDialog (I have copied the structure from the StrataFlix Sample). This works fine and I can set all properties using the property tab from Visual Studio.



No I have inherited from MyBrowseDialog (same as above creating the TestBrowseDialog.cs and TestBrowseDialog.Designer.cs file inherited from MyBrowseDialog), but my problem is now that I cannot set some properties using the Visual Studio property tab. For example, when I put the BusinessObjectType property, it's not in "Bold" in the property window, and no code is generated in the Designer.cs file. For other properties like ReturnSelectedRecordOnly it works well.



What I'm doing wrong?



Thanks,

Alex B.
By Ivan George Borges - 3/30/2010

Hi Alex.

Try overriding the IsInheritedBrowseDialog function:

    ''' <summary>
    ''' Overrided so to be able to have a Base Browse Dialog
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Protected Overrides Function IsInheritedBrowseDialog() As Boolean
        '-- Establish locals
        Dim llReturn As Boolean = False

        '-- Determine if this is an inherited form
        If Me.GetType().IsSubclassOf(GetType(_BaseBrowseDialog)) Then
            '-- This is an inherited class
            llReturn = True
        End If

        '-- Return the value
        Return llReturn
    End Function

By Alex Bibiano González - 3/30/2010

A lot of thanks. It work's.



Is this somwhere documented?



Alex B.
By Ivan George Borges - 4/1/2010

Glad it worked Alex.

Not sure about the docs, I just remembered I went through the same thing and got the code from my application for you.