Insulation Layer


Author
Message
Randy Jean
Randy Jean
StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)
Group: StrataFrame Users
Posts: 105, Visits: 641
The Visual Foxpro framework we currently use has an "i" layer or "insulation" layer which is where all developer changes are recommended take place.  All application instances are then subclassed from this layer vs. directly from the framework vendor's classes. 

Question: does Strataframe have an "insulation" layer to prevent future source upgrades from overwriting developer enhancements?  If not, is it recommended one create their own subclasses and, if so, can the Strataframe wizards, builders, factories, etc. be changed to subclass from this layer?

Thanks in advance,

Randy Jean

Replies
Randy Jean
Randy Jean
StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)
Group: StrataFrame Users
Posts: 105, Visits: 641
Thanks for the quick response!  Guess I should brush up on events vs. method overrides.  I've seen the move toward events even in the VFP world as the newest version has better event binding.
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
You're right, VFP was starting to get better with events.  But their most recent version doesn't even begin to support events natively.  The problem with VFP is that they were trying to "slap a bandaid" on the problem to support event binding, creation, and handling.  All event processing is at the root level of .NET which makes it truly a viable solution.
Randy Jean
Randy Jean
StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)
Group: StrataFrame Users
Posts: 105, Visits: 641
OK, here's an example of something I know how to do through inheritance, but not sure how to do with events:



Strataframe Labels: I would like the default for all labels to be backcolor = transparent



I know how to do this through subclassing and I know if I I was not using the trial and had Strataframe source I could change the base class (which would not insulate me from future upgrades overwriting my change), but how would I do this using events?



Thanks,

Randy
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
You would need to somehow attach to the visiblity changed event of every label within the application and within the event handler, set the back color to transparent.  It is possible with events, but won't find a good place to centralize attaching to all of those events.  You're better off subclassing the StrataFrame label and using that for everything.

You'll also want to be aware that the label inherits it's back color from it's parent, you'll need to set the property after the ParentChanged event in the subclass.  Or, you could override (or shadow) the back color of the form and set it to always return Transparent.

Randy Jean
Randy Jean
StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)StrataFrame User (233 reputation)
Group: StrataFrame Users
Posts: 105, Visits: 641
This seems to work. Do you see anything wrong with this?





Imports System.Drawing



Public Class OGSFFormControls



Class OGSFLabel

Inherits MicroFour.StrataFrame.UI.Windows.Forms.Label

Public Sub New()

MyBase.New()

TextAlign = ContentAlignment.MiddleRight

Font = New Font("Lucida Sans Typewriter", 8.0!, _

FontStyle.Regular, _

GraphicsUnit.Point, CType(0, Byte))

Height = 12

BackColor = Color.Transparent

End Sub

End Class



End Class


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Randy Jean - 19 Years Ago
Trent L. Taylor - 19 Years Ago
Randy Jean - 19 Years Ago
Trent L. Taylor - 19 Years Ago
                     OK, here's an example of something I know how to do through...
Randy Jean - 19 Years Ago
                         You would need to somehow attach to the visiblity changed event of...
StrataFrame Team - 19 Years Ago
                             This seems to work. Do you see anything wrong with this?
...
Randy Jean - 19 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search