Subclassed BrowseDialogs and Instance Properties...


Author
Message
StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
No, I'm not aware of a way have a form that is "partially modal."  In my experience, it's either all or nothing.  However, you might be able to change the source so that it doesn't show modal, but just shows itself.  Then, you could store a reference to the BrowseDialogWindow off in the form and when you try to activate the form (Activated event), you could see if there is a BrowseDialogWindow open and activate it instead.  I'm not sure how that would work, because you'd also have to add the logic into the BrowseDialogWindow to close itself if it's not modal instead of just setting the DialogResult.
Robin J Giltner
Robin J Giltner
StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)
Group: Forum Members
Posts: 105, Visits: 650
Ahh, gotcha.  That actually answers a lot of other questions I had about BrowseDialogs. But I do have one other quick question, we are using a Main form and several mdi child forms. These child forms are where all of our browse dialogs are.  Is there anyway that the main for could still be accessible when a child form's BrowseDialog is open?  We have a request that some of the tools be available for unit conversion when doing a browse. Those are on the main form and I can't seem to figure out a way to only have the BrowseDialog lock it's parent form, not all open forms.

Thanks

Robin Giltner

StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Ah, here's a good explanation of why the property isn't being serialized.  It's by design, so you'll probably need to set any instance specific properties by hand in your form startup code.

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

Or, you could override the IsInheritedBrowseDialog() method and test on the System.Environment.StackTrace property Wink

So, say, if the stack trace contains "ShouldSerializeBrowseResultsImageList" then you would return False, because you want the property to be serialized, otherwise, just return the base value.

Robin J Giltner
Robin J Giltner
StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)
Group: Forum Members
Posts: 105, Visits: 650
Recently I've noticed that our subclassed browse dialogs aren't behaving the same as regular BrowseDialogs.  Mainly the property changes on an Instance of a subclassed BrowseDialog don't seem to be getting saved. Properties like the BrowseResultsImageList.  It isn't set in the BD class, but dropped on the form the BD is going on, and the instance of the BD gets it ImageList set. 

I tried doing the same thing on the CRM Application sample, setting the ImageList on the instance of the CustomersBrowseDialog1 on the CustomerMaintenance Form to the imgBrowse, and after a rebuild, it went back to empty.

Robin Giltner

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