livebindings

How to populate a user-defined column in an FMX TGrid by LiveBindings

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-10 16:20:14
问题 I am trying to create a TCalendarEdit containing column inside a grid component in the following way. type TDatecell = class(TCalendarEdit) end; TDateColumn = class(TColumn) private function CreateCellControl: TStyledControl; override; public constructor Create(AOwner: TComponent); override; end; ... constructor TDateColumn.Create(AOwner: TComponent); begin inherited; end; function TDateColumn.CreateCellControl: TStyledControl; begin Result := TDatecell.Create(Self); end; It works fine. Then

It is possible to do something like XE2 LiveBindings in D2010?

不羁的心 提交于 2019-12-09 13:30:29
问题 It's factible or it uses some compiler technology only available in XE2 ? I just want to bind (bidirectional) a TEdit.Text property to a object function that returns a string in code (I don't need designer components or expression evaluators).. Thanks! 回答1: I guess you could try Delphi sorcery library. It has quite powerful data binding solution which should work in all the modern Delphi versions. 回答2: No, as far as I can tell, the LiveBindings system was implemented entirely in code with no

Observers property in TComponent

我只是一个虾纸丫 提交于 2019-12-09 04:41:15
问题 Hi Delphi XE2 TComponent has a new "Observers" property. Unfortunately the help entries for this are empty. Does anybody know what this new property is good for and how to use it? Edit: Well i know that it is related to LiveBindings, but I would love to know a bit more about it, and since I have no access to XE2 source code, I can't investigate myself. 回答1: It is related to LiveBindings. A rather cool but extensive subject, explained in the new DocWiki for XE2. 回答2: The Delphi implementation

How to show more than 200 rows in TStringGrid using LiveBindings?

随声附和 提交于 2019-12-07 02:50:44
问题 I have a TDataSource that is backed by a TClientDataset bound to a TStringGrid . I did this by right-clicking on the grid, selecting " Link to DB Datasource... ", and selecting the DataSource. This setup the LiveBindings for me. When I run the application, the grid only fills with 200 rows, even though there are 5000 records in the dataset. I'm unable to find any documentation regarding how to change the number of rows displayed or the proper way to allow the user to scroll through all of the

Using Livebindings to Assign Several Field Values to an FMX MetropolisUI TListBox Item.Text

佐手、 提交于 2019-12-06 16:20:31
I am coding a FMX Metropolis UI application and trying to assign two field values of type string to the Item.Title member of TListBox by LiveBindings technology (using expression engine). When I use a TBindList in the following way: object BindList1: TBindList Category = 'Lists' ControlComponent = ListBox1 SourceComponent = BindSourceDB1 FormatExpressions = < item ControlExpression = 'Text' SourceExpression = 'FieldByName("name1").Text + " " + Field' + 'ByName("name2").Text' end> FormatControlExpressions = <> ClearControlExpressions = <> end It assigns the 'name1 name2' string to the member

Livebinding JSON objects and arrays

三世轮回 提交于 2019-12-06 08:40:04
Good evening all. I'm currently trying to get to grips with livebindings in Delphi as I'd like to refresh one of my current projects (complete rework from the base for the purpose of pushing to other platforms, optimizing performance and minimizing the code). I'm working with a web API which returns JSON data. The returned JSON format for one example call would look like this; { "response": { "ips": [ { "ip": "111.222.333.444", "classification": "regular", "hits": 134, "latitude": 0.0000, "longitude": 0.0000, "zone_name": "example.com" }, { "ip": "555.666.777.888", "classification": "regular",

How to show more than 200 rows in TStringGrid using LiveBindings?

风格不统一 提交于 2019-12-05 06:02:45
I have a TDataSource that is backed by a TClientDataset bound to a TStringGrid . I did this by right-clicking on the grid, selecting " Link to DB Datasource... ", and selecting the DataSource. This setup the LiveBindings for me. When I run the application, the grid only fills with 200 rows, even though there are 5000 records in the dataset. I'm unable to find any documentation regarding how to change the number of rows displayed or the proper way to allow the user to scroll through all of the data. I did find the hard coded 200 value in TBindScopeDBEnumerator.Create in the unit Data.Bind

Delphi: Making a component visible to live binding

£可爱£侵袭症+ 提交于 2019-12-04 12:39:15
I have been trying to make a test object that has a string property visible to the visual binding form. The component is registered with the appropriate properties. Using XE8 and Firemonkey. I can get it to show on the visual binder by selecting it using the hide show elements, however I cannot get it to bind the Foo string to a TEdit text property, the readonly (which does nothing yet) will bind to the Text Property. how do I get it show in it with default class visibility why doesn't the Foo string bind to the text property The help files are a little thin on this. I guessing I'm missing

How do I get the SelectedValue of a ComboBox from code?

故事扮演 提交于 2019-12-03 17:37:00
I am trying to build something like a TLookupComboBox using LiveBindings. I have placed a normal TComboBox on a VCL form. I also have a data set with some rows that have the two fields id and text . Then I used the LiveBindings editor to create a TBindSourceDB and a TBindingsList . There is just one binding in it: object BindingsList1: TBindingsList Methods = <> OutputConverters = <> UseAppManager = True Left = 244 Top = 229 object LinkFillControlToField1: TLinkFillControlToField Category = 'Quick Bindings' Control = ComboBox1 Track = True FillDataSource = BindSourceDB1 FillValueFieldName =

It is possible to do something like XE2 LiveBindings in D2010?

我怕爱的太早我们不能终老 提交于 2019-12-03 16:34:01
It's factible or it uses some compiler technology only available in XE2 ? I just want to bind (bidirectional) a TEdit.Text property to a object function that returns a string in code (I don't need designer components or expression evaluators).. Thanks! I guess you could try Delphi sorcery library . It has quite powerful data binding solution which should work in all the modern Delphi versions. No, as far as I can tell, the LiveBindings system was implemented entirely in code with no new language features introduced to support it. Which is a bit of a shame, IMO; it could be a much simpler and