First of all, thanks for the nice feedback I had since my CodeRage X session about TFrameStand (at the moment the replay got more than 400 views and some upvote). It seems most people who tried the component, actually liked it and I am happy of this 🙂
These weeks, I’ve added a significant set of new features to TFrameStand so I think it is time to release a new version: v.1.1.
Warning: The new version (1.1) is already available also on GetIt, be sure to uninstall the previous version (1.0) before installing the new one.
What’s new in v.1.1:
1. Improved component editor
The component editor has been enhanced in order to let you test your stands easily and have a chance to set some properties to mimic the real behavior you are trying to implement.
For example, you can set the Align property value of the test frame and/or provide specific Width and Height values for it.
Also you can specify a Delay value when hiding the stand, so you can properly preview a stand that has animations running on hiding.
The preview area is now labeled “TestBed” and there is a TestBed.ClipChildren checkbox to determine the value of the omonymous property for the TestBed (helps when simulating slide in/out transitions).
2. Better handling of Hide when it is not immediate
If you had some OnHide* animations, you may have experienced that if a second (or multiple) call to Hide method occurs, the OnHide* animations are run again (causing them to misbehave).
With version 1.1, there is an inhibitor mechanism to avoid messing up with multiple Hide calls. Also there is a new Hiding property (in TFrameInfo<T>) that can be used to determine if this framestand is going to be hidden (that is, someone already called Hide and the framestand is executing the OnHide* animations or the hiding Delay is not yet elapsed).
3. Automatic determination of Hide delay
With version 1.0, if you added OnHide* animations to your framestand, you had to manually specify the Delay argument of the Hide method, in order to instruct the TFrameStand to wait enough time to let animations finish.
Now you can avoid to do that, since v.1.1 can inspect your framestand and determine the proper amount of time it is needed to complete the OnHide* animations. The Delay argument is still there and you can override it as you like but if it is zero (the default value, when omitted) TFrameStand will automatically determine a sufficient value.
4. Added TActionList support for CommonActions
The CommonAction mechanism was quite limited in v.1.0 (you could specify a piece of code, through an anonymous method, to be executed when a TButton had a name matching a specified string pattern). The mechanism is intended to share some actions across different stands and/or frames.
With v.1.1, you can link the TFrameStand to a TActionList (setting the CommonActionList property of TFrameStand) and you will be able to associate any control (having TAction support, of course) to any action in the CommonActionList. The matching is by name (with a prefix you can customize in the TFrameStand.CommonActionPrefix property): if you have a TAction item with name ‘Action1’, in your stand you can have (let’s say) a TButton with name/stylename ‘ca_Action1’ and it will be bound to Action1 when the framestand is created.
This means you can centralize your code in TActionList (always a good practice) and easily bind these actions to your stands/frames. Obviously this brings to you all the power of TAction, such as more controls available (not only TButtons) and OnUpdate events to keep actions’s state coherent throughout the whole application.
I’ve added also a new event (OnBindCommonActionList) to allow custom binding criteria across the actions and controls of the stand/frame (useful for example if you need to bind the same action to multiple controls, given the by-name criterium does not allow multiple matches).
5. Added DefaultParent property
This is the smallest feature added in v.1.1 but can be handy: you can now set, at design-time, the Parent object to be used when showing the framestand. You can always override this by passing the AParent argument to the New and Use methods but it is nice to have a decent default.
In v.1.0, if you didn’t specify the AParent parameter, the actual Parent would have been the form holding (Owner of) the TFrameStand instance. Now you can specify a TFmxObject to be the default Parent of your framestands, if none is provided, the previous behavior is applied (so it is 100% backward compatible).
Feel free to contact me if you have any questions about TFrameStand and remember there is an issue tracker on the GitHub repository you can use. Also remember you can get TFrameStand through GetIt (Embarcadero‘s Package Manager) or cloning the GitHub repository. The first way it is easier (2 clicks installation process!), the second can lead you to the latest developments (and bugs of course 😉 ).