Control Effects
From Morfikwiki.com
Morfik AppsBuilder offers a wide variety of special formatting effects that can be applied not only to bands and containers, but also to controls.
Contents |
[edit] Sample of the Available Effects
Morfik effects can be used to create interesting design elements which will enrich you application or website's interface. The following pictures show some controls in their plain form and with one or more effects applied to them.
Several effects can be combined in the same control to create a totally new visual experience in your website. The Figure 3 shows a set of buttons such as the one seen in Figure 2, but with several effects applied to them in order to define a new look.
Note that in Figure 3 the buttons have had different but symmetrical effects applied to them in order to give the impression of being a single strip of controls with rounded corners on both sides.
[edit] Types of Effects Available
The following effects are available to be applied to different types of controls. Each control has a different set of effects that can be applied to it, according to how they are used in an application.
[edit] Combining Effects
All of these effects can be effectively combined in the same control (according to which ones are available for a specific control) in order to achieve a desired result. If fact, it is quite frequently the case of some controls. Button controls for example frequently have the Gradient and Corners effects applied to them. Figures 4 and 5 show good examples of combining the Gradient, Corners and Shadow effects in Container controls.
[edit] Applying effects to dynamically created controls
Morfik effects are determined at compile time and the corresponding images are generated at that point. This means that you cannot just have these effects applied to a control you create dynamically at runtime. You can, however, copy the background image of a pre-existing control to another control. The following code snippet shows how this can be achieved.
Procedure Content.Button1Click(Event: TDOMEvent);
Var
cnt : Container;
Begin
cnt := Container.Create('NewButton', Self);
cnt.Attrs.Left := 100;
cnt.Attrs.Top := 100;
cnt.Attrs.Height := Container1.Height;
cnt.Attrs.Width := Container1.Width;
cnt.Attrs.Background.Assign(Container1.Attrs.Background);
cnt.CreateDomObject;
End;





