Jim T1392 Tierney

Jim T1392 has not set their biography yet

Posted by on in Blogs
XE3 Visual LiveBindings: User defined C++ objects In the previous post, TListBindSourceAdapter<TContact> is used to enable a list of Delphi TContact objects with LiveBindings, using the CreateAdapter event handler: implementation {$R *.dfm} uses ContactsUnit, System.Generics.Collections; procedure TForm1.AdapterBindSource1CreateAdapter(Sender: TObject; var ABindSourceAdapter: TBindSourceAdapter); begin ABindSourceAdapter := TListBindSourceAdapter<TContact>.Create(Self, LoadContacts); end; C++ custom object ca...

Posted by on in Blogs
XE3 Visual LiveBindings: User defined objects The adapter components TListBindSourceAdapter and TObjectBindSourceAdapter enable LiveBindings with user defined TObjects. Here is a user defined TObject  for example. type TContact = class private FFirstName: string; FLastName: string; public constructor Create; overload; constructor Create(const AFirstName, ALastName: string); overload; property FirstName: string read FFirstName write FFirstName; property LastName: string read FLastName write FLastNam...

Posted by on in Blogs
XE3 Visual LiveBindings: Samples Here is a summary of the samples which accompany my XE3 VLB posts.  The samples are grouped by Sourceforge locations. Observers (post) VclSampleObservableControls.dpk - Implements an observable TTrackBar LinkTrackbarToField.dpr - TObservableTrackBar project Actions (post) Navigate using actions and TSpeedButton Vcl\LiveBindingsActionsProtoProject.dpr Fmx\FmxLiveBindingsActionsProtoProject.dpr Vcl\LiveBindingsActionCDSProject.dpr Fmx\FmxLiveBindingsActionsCDSProject....

Posted by on in Blogs
XE3 Visual LiveBindings: TListView A previous post uses TListBox to demonstrate how to link fields to a list control.  The same steps can be used to link fields to TListView. Here is a sample form with a TListView: To improve the TListView appearance, the ListView1.ViewStyle property has been set to vsList. The LiveBindings designer looks like this: A project containing this form can be downloaded here.  See SimpleListView.dpr. The LiveBindings designer also supports TListView columns.  Follow these steps t...

Posted by on in Blogs
XE3 Visual LiveBindings: Lookup controls A lookup control displays a value that is different from the actual field value. In this post, I modify the sample application built in the previous post about lookup lists. The lookup list example ended with this design: The lookup list ended with this form: To demonstrate a lookup control, this form is changed so that the TLabeledEdit displays a color name instead of a color number. For example, "DarkGreen" is displayed instead of "25600". To accomplish this, a "Looku...
XE3 Visual LiveBindings: Link a field to a lookup list A lookup list is used when the actual data values are not meaningful to users. A lookup list populates a list control with display values, instead of actual data values. We can configure two TPrototypeBindSource components to represent a situation that calls for a lookup list. These steps differ from the previous post by using a Colors field in addition to a ColorsName field. The Colors field holds a numeric color value. First, create the "DataSource". New VCL application Drop a TProto...
XE3 Visual LiveBindings: Link a list control to a field List controls can be linked to data source fields. TListBox, TComboBox and VCL TListView are examples of list controls. When a list control is linked to a data source field, the selected item in the list control corresponds to the value of the data source field. To change the value of the field, the user selects a different item in the list control. Typically, two data sources are used with a list control. One data source provides the value to select in the list control. The other dat...

Posted by on in Blogs
XE3 Visual LiveBindings: Hiding and showing components This post describes how to specify which components show on the LiveBindings designer. Hide/Show Component Classes To reduce clutter, the LiveBindings designer hides many classes of components. The default settings show most visual control classes and hide most non-visual components classes except for data sources. The settings are in Tools/Options/LiveBindings: If there is a component class that you always want to see on the LiveBindings designer, add it to the "Included Items:" f...

Posted by on in Blogs
XE3 Visual LiveBindings: Actions LiveBindings actions are new in XE3.  If you are not familiar with actions, follow this link.  LiveBindings actions correspond to the buttons on the TBindNavigator such as First, Next, Edit, Post, and Delete. Steps for creating a speed button which uses a LiveBindings action: Drop a  TPrototypeBindSource on the form and add fields.  See this post. Drop a  TActionList Drop a TSpeedButton In the object inspector, click the down arrow next to the SpeedButton1.Action property. Choos...
XE3 Visual LiveBindings: Link controls to component properties Simple controls can be linked to component properties.   TEdit is an example of a simple control.  TLabel.Text is an example of a component property.   Controls can be linked to most public properties of any component on a form. Link controls to component properties in the LiveBindings designer After a TEdit and TLabel are dropped on a FireMonkey form, the LiveBindings designer represents the TEdit with the member "Text" and the TLabel with the member "Text": The LiveBindings designer c...

Check out more tips and tricks in this development video: