Jump to content

programmerdelphi2k

Members
  • Content Count

    1406
  • Joined

  • Last visited

  • Days Won

    22

Everything posted by programmerdelphi2k

  1. programmerdelphi2k

    TStringGrid ComboBox not updating dataset

    FMX sample: using more easy way to "use a list of values in a column" = PopUpColumn on StringGrid type TForm1 = class(TForm) StringGrid1: TStringGrid; PopupColumn1: TPopupColumn; Memo1: TMemo; procedure StringGrid1CreateCustomEditor(Sender: TObject; const Column: TColumn; var Control: TStyledControl); procedure StringGrid1EditingDone(Sender: TObject; const ACol, ARow: Integer); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.fmx} procedure TForm1.StringGrid1CreateCustomEditor(Sender: TObject; const Column: TColumn; var Control: TStyledControl); begin Memo1.Lines.Add(TimeToStr(now) + ' - CreateCustomEditor'); // // loading values... or anyother sources! PopupColumn1.Items.DelimitedText := 'Item1,Item2,Item3'; end; procedure TForm1.StringGrid1EditingDone(Sender: TObject; const ACol, ARow: Integer); begin Memo1.Lines.Add(TimeToStr(now) + ' - EditingDone'); end;
  2. programmerdelphi2k

    String literals more then 255 chars

    is it not the same than above? procedure TForm1.Button1Click(Sender: TObject); var LText : string; LSubText : string; LFinalText : string; LPos : Integer; LTextLength: Integer; LLineLenght: Integer; begin // here, there is no-way!!! "const" just 255 LText := 'They are of type String already. The limitation seems to be in the parser which cannot deal with lines longer ' + { } 'than 255 characters in the source. But there is an easy workaround, which your third-party tool should use for long string ' + { } 'literals: split it into several shorter literals concatenated by plus linebreaks. Much easier to read for you as well if you need' + { } ' to manually correct stuff later.'; // LFinalText := #39; LLineLenght := 11; // >= 1... LPos := 1; // > 1.. LTextLength := LText.Length; while LPos <= LTextLength do begin LSubText := copy(LText, LPos, LLineLenght); // LFinalText := LFinalText + LSubText + #39; // LPos := LPos + LLineLenght; // if (LPos <= LTextLength) then LFinalText := LFinalText + '+' + sLineBreak + #39; end; // Memo1.Text := LFinalText; end;
  3. programmerdelphi2k

    Panels and alignment

    The problem with the "FlowPanel" is precisely the "flow of controls inside it"... Try placing the 5 panels above (left aligned) and resizing the "FlowPanel" to different sizes, including changing the "FlowStyle" to whatever others... First, you may not be able to keep all the sub-panels left-aligned (like the sample above), as the "FlowPanel" will have its own alignment rule! So the "Align" property of the sub-panels will have no effect!
  4. are you using any 3rd-party components in special? if yes, what? try zip your "Form+Pas" and upload here... let me see it
  5. programmerdelphi2k

    FireDAC performances

    look, to "GROUP all data" it's necessary a while... index, find, group, etc... etc.. etc.. if this is done using a "VIEW" on DB (before any usage), then, this time can "is gone" not? did you try if it's possible or not?
  6. programmerdelphi2k

    TStringGrid ComboBox not updating dataset

    try this... // my sample in FMX project AGridOrStringGrid.BeginUpdate; try TMyHackTGridModel(AGridOrStringGrid.Model).DoSetValue(ACol, ARow, AValue); // calls OnSetValue(...); // AGridOrStringGrid.Model.PostEditorValue; // <---- all rest is done by "Model" if datasource is your table, etc... // finally AGridOrStringGrid.EndUpdate; end;
  7. programmerdelphi2k

    Panels and alignment

    maybe putting all "panel (with your alignment)" in a "PANEL" then, can help you not? if in FMX, use a TLayout procedure TForm1.Btn_Hide_Show_PanelsClick(Sender: TObject); begin // who will be the first... or last = visible? for var i: integer := 0 to (Form1.ComponentCount - 1) do if Form1.Components[i] is TPanel then TPanel(Form1.Components[i]).Visible := not TPanel(Form1.Components[i]).Visible; end; procedure TForm1.Btn_Show_Hide_PanelONEClick(Sender: TObject); begin // nothing should be change here! stay where was defined! Panel1.Visible := not Panel1.Visible; end; all aligned on "Left": 2,3,4,5,6
  8. programmerdelphi2k

    FireDAC performances

    many "JOINs" for sure... did try use a "VIEW" instead create your SQL all time? using a "VIEW" (on DB definition) your data "always" it's ready for use any time! then, you use this "VIEW" as you table as usual... but none space it's really used on DB!!! Tip: maybe you need "re-think" your way not?
  9. programmerdelphi2k

    How to register a shell property sheet for a single file type?

    I dont know if help but I found this page with sample to "Control Panel" + new propsheet with "source code" in "C" (.... shellex\PropertySheetHandlers) by Michel Dunn https://www.codeproject.com/Articles/802/Adding-Custom-Pages-to-Control-Panel-Applets Added: in the book "Delphi 5 Developer's Guide - Xavier Pacheco and Steve Teixeira (Dec-1999)" exists a topic "Extending the Windows Shell", Chapter 24, pg 1251, about TContextMenu customization
  10. programmerdelphi2k

    Retrieving Android Device IP Address Problem

    did try use "AppTethering?"... = UDP and TCP = Indy behind scenes!!! easy setup just create a group/password and it's ready same network or not. Network/Bluetooth http://www.malcolmgroves.com/blog/?p=1842
  11. programmerdelphi2k

    What is AUTO RUN for?

    try look REGISTRY on Embarcadero keys.. delete the reference (not the "Key") if not necessary anymore
  12. programmerdelphi2k

    FireDAC performances

    post your SQL text ( not need all Fields ... just fields used to create the "joins" between tables ) ... how is it?
  13. programmerdelphi2k

    Retrieving Android Device IP Address Problem

    you need "uses System.Generics.Collection;"
  14. programmerdelphi2k

    Retrieving Android Device IP Address Problem

    in fact, many errors occurs on code above... I think that is necessary "review it"... for current IDE's like RAD 11. MyList = my var used to store a list of "TJInetAddress", nothing more. you can use "array", you dont need any TList, at all.
  15. programmerdelphi2k

    Alexandria 11.3 - Firedac/OnValidate String Field

    this occurs in any visual component with "scroll" action, like in TDbgrid, TDbCtrlGrid... in TDbEdit I dont see it...
  16. programmerdelphi2k

    Alexandria 11.3 - Firedac/OnValidate String Field

    no no no... the "rules" should be on DB not in "visual/non-visual" components, like your sample! of course, you can do it if you want!
  17. programmerdelphi2k

    Alexandria 11.3 - Firedac/OnValidate String Field

    I dont know... it's necessary wait Embarcadero ticket... I never use "Dataset" events like this... always in DB by default! all biz-rules!!!
  18. programmerdelphi2k

    Alexandria 11.3 - Firedac/OnValidate String Field

    in two case above, when "S" you read this: if FALSE or TRUE then = true if FALSE AND TRUE then = false
  19. programmerdelphi2k

    Alexandria 11.3 - Firedac/OnValidate String Field

    sorry my fault...
  20. programmerdelphi2k

    Alexandria 11.3 - Firedac/OnValidate String Field

    the values is already "empty" since "procedure TForm3.FDMemTable1NewRecord(DataSet: TDataSet);"
  21. programmerdelphi2k

    Alexandria 11.3 - Firedac/OnValidate String Field

    ok, the errors appears = field value = empty... but the record is appended with value informed!
  22. programmerdelphi2k

    Alexandria 11.3 - Firedac/OnValidate String Field

    ShareX - open source on Github +200 contributors Microsoft Store: search for "ShareX" tool or https://getsharex.com/
  23. programmerdelphi2k

    Alexandria 11.3 - Firedac/OnValidate String Field

    im has only RAD 11.3
  24. programmerdelphi2k

    Alexandria 11.3 - Firedac/OnValidate String Field

    zip with only EXE = virus, ransomware, spyware,... no no no, show the source please!
×