Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

18 Good

About Serge_G

  • Birthday 06/29/1956

Recent Profile Visitors

298 profile views
  1. Well, , I only test Fluent Livebindings with a TGrid, not TStringGrid, but demo included in the package is with a stringgrid, so I don't see anything except a missing unit in your form. My tests are somewhere a little not objectives in the way I put on the same form a grid linked (TBindGridLink) with the visual livebindings editor and another with Fluent (raising the fact this last is not a WYWSSEWYG method) unit so all the units were added.
  2. Yes FluentLiveBindings should work, and so easy to write BindingsList1.BindGrid(Grid1).ToBindSource(BindSourceDB1); But no CustomFormat can be used (perhaps I don't know how, or further development ?) My code for runtime linking var ABindGrid : TBindGridLink; begin ABindGrid:=TBindGridLink.Create(self); ABindGrid.ControlComponent := Grid1; ABindGrid.SourceComponent := BindSourceDB1; // synch with ABindGrid.PosControlExpressions.AddExpression do begin ControlExpression := 'Selected'; SourceExpression := 'Math_Max(0,DBUtils_ActiveRecord(Self))'; end; with ABindGrid.PosSourceExpressions.AddExpression do begin ControlExpression := 'Math_Max(1,Selected+1)'; SourceExpression := 'DBUtils_ValidRecNo(Self)'; end; // columns with ABindGrid.ColumnExpressions.AddExpression do begin ColumnName := 'Column1'; ColumnIndex := 0; SourceMemberName := 'SS_NUMBER'; // field format '0 000 000 00' (a crazy one ;-) just for test) with FormatCellExpressions.AddExpression do begin ControlExpression := 'Data'; SourceExpression := 'DisplayText'; // I kept Display text, but 10.4.1 don't need end; end; with ABindGrid.ColumnExpressions.AddExpression do begin ColumnName := 'Column2'; ColumnIndex := 1; SourceMemberName := 'FIRST_NAME'; With FormatCellExpressions.AddExpression do begin ControlExpression := 'Data'; SourceExpression := 'Value+'#39' '#39'+Dataset.LAST_NAME.text'; end; end; Regret, I am unable to use a "with TBindGridLink.Create(Self) do ...." form
  3. Serge_G

    Grid Sort indicator

    Hi, It seems too late but you can look at my (sorry french) paper about customizing Grid https://serge-girard.developpez.com/tutoriels/Delphi/Livebindings/Grilles/ Ok it's not about headers it's one of the Todo in my notebook I had no time to investigate (I go on listviews instead of grids) but still in my mind I think about a new column style
  4. Serge_G

    Free SQLite -> Interbase tool?

    I suggest this as a one shot solution (quick and forget) , not for a runtime application 😉
  5. Serge_G

    Free SQLite -> Interbase tool?

    Hum, I was not aware of but in my mind if there is a JDBC driver for Interbase (and there is one) it was possible to connect Dbeaver to Interbase. Thanks Firedac and TFDBatchmove ! Except for, and I am not sure of the "except" I just don't test but as I remember output table can be created with same structure input table, creating the table you don't have to write an executable program just in design time you can do the transfer data from table to table. Put 2 connections (one SQlite, other Interbase) 2 related FDTables (or FdQuerys), one FdBatchMove, one FDBatchMoveDatasetReader (for sqlite side) one FDBatchMoveDatasetWriter (for guess wat ;-)) and then you can execute fdbatchmove (contextual menu) during designtime
  6. Serge_G

    Free SQLite -> Interbase tool?

    Hi, I don't use DBeaver for that but have a look to this GUI
  7. Serge_G

    Programmatically Change Properties of a Custom style

    Panel is no more than a TRectangle (depending style file I think) I don't know why but if you try to change TPanel fill color this does not work with 'windows 10 desktop style' , works during design time with 'default' Stylecollection but not at runtime 🐛something to do with the fact that this TRectangle is at the root and not in a TLayout ? Best suggestion I can do is : use a TRectangle. I do not use anymore TPanel now, preferring Layouts and TRectangle 😉
  8. Serge_G

    Programmatically Change Properties of a Custom style

    As I understand what is in your mind, I think it's your ChangeObjectRecursive function the problem. A component (your panel) as style but style is not the "container" of the panel's childs. And therefore, you change wrong "styledata" property for a label See this : // Changing all labels of a panel randomly procedure TForm112.Button1Click(Sender: TObject); var aColor : TAlphaColor; procedure ChangePanelLabels(const Panel : TPanel; const ChangeToColor : TAlphaColor); var i : integer; begin if SameText(Panel.StyleLookup,'panel1style1') then begin for i:=0 to Panel.Children.Count - 1 do begin if Panel.Children[i].ClassNameIs('TLabel') then TLabel(Panel.Children[i]).StylesData['Text.TextSettings.FontColor']:= ChangeToColor; end; end; end; begin randomize; aColor:=Random($FFFFFF) OR $FF000000; // add alpha layer ChangePanelLabels(Panel1,aColor); end;
  9. Serge_G

    TStringGrig formatting date

    %s is yet a string so it's somewhere normal Try FormatDateTime('dd.mm.yyyy',value) or declare your fields, set your date field displayformat property to 'dd.mm.yyyy' and use displaytext in customformat
  10. Serge_G

    TListBox, TListView how to use Sort(Compare) ?

    Sorry, not being specific. Late I found, really by chance, why the code I used procedure TForm110.btnDetailClick(Sender: TObject); // numeric sort on detail var Compare : TFMXObjectSortCompare; begin Tri:=btnDetail.Tag; if btnDetail.Tag=1 then btnDetail.Tag:=0 else btnDetail.Tag:=1; ListBox1.Sorted:=False; Compare:=function(item1, item2: TFmxObject): Integer var n1,n2 : Single; begin n1:=StrToFloatDef(TListBoxItem(item1).ItemData.Detail,0); n2:=StrToFloatDef(TListBoxItem(item2).ItemData.Detail,0); if n2=n1 then result:=0 else begin if n2>n1 then Result := 1 else Result := -1; end; if tri=0 then result:=result*-1; end; ListBox1.Sort(Compare); // here end; seems to be useless. Just resizing the form (to take a picture) 'refreshed' the aligned list. Before solving, I used a BeginUpdate/EndUpdate sequence with no effect ! So that was why I don't understood the usage of list.sort(compare) was not 'working'. A self.width:=self.width+1; self.width:=self.width; confirmed that but was not the solution. Finally, digging in the source code, I found the solution ListBox1.RealignContent; Just after the sort did it. Joined, comparative runtime screens (first alpha sort on text using sorted:=true, second numeric sort on detail using sort(compare) twice to have DESC order)
  11. Hi, I found a way to sort my lists using Sort an OnCompare event but I don't figure out a functional way to use Sort(Compare) method (Rio 10.3.3) Any clues ? Thanks
  12. Serge_G

    FireDac Query Issue

    A close no, but an unprepare should be to check. If your first SQL works, other request just changing parameter works. i.e dm.fdq.Open('',[ 2 ] ); It's when you change the SQL and parameters the problem.
  13. Serge_G

    Animating TListViewItem

    Well don't be so afraid. I think you can use a TFrame (somewhere TFrame is like a style) for all that filling stuff. I think it was the Paul Toth approach.
  14. Serge_G

    Animating TListViewItem

    Hi, I never thought about including animation in a ListView but, why not 😉 However my guess is TListView is not a good candidate for this sort of usage. Instead think about the ancestor, a TScrollBox. In my mind, this Jaques Nascimento video or videos from CodeRage2019 (Paul Thoth and Adriano Santos interventions)
  15. Serge_G

    FireDac Select with parameter, how to renew

    Hello, This was a question I had in mind for a long time. I used to use, like ergeka and, even, closing the query before (old BDE comportment) dm.fdc.Close; dm.fdc.parambyname('Pc').asString:='Woolworths'; dm.fdc.Open; So, today, I make a little test and Firedac is really an amazing thing dm.fdc.Open,('',[ 'Woolworths' ]); works. One only line versus 2 (three in my case) and shorter than this ParambyName stuff. I certainly use this for now 😉 By the way I test also this query Select * from tTable where Company = ? order by oOrderName a no named parameter. It works too 👍