Lajos Juhász
Members-
Content Count
986 -
Joined
-
Last visited
-
Days Won
12
Everything posted by Lajos Juhász
-
Delphi compatibility with Windows 11?
Lajos Juhász replied to PeterPanettone's topic in General Help
If you don't upgrade your computer to Windows 11 how do you test if your application works correctly or not? Please don't tell me that you force all of your users not to upgrade and not to buy a new computer with Windows 11 OS. -
It was a FB announcement that I've pasted here.
-
That's not the complete product preview only contains information about user interface. The full preview is going to be tomorrow: Have you registered yet? RAD Studio 11, Delphi 11, and C++Builder 11 are just around the corner! Join Marco, David, and Jim for this sneak peek at this huge leap forward in your favorite development tools. September 9th at 9 AM / 1 PM / 6 PM CDT. Register here: https://embt.co/SneakPeek-RAD11
-
Generics compiler Error "Incompatible Types"
Lajos Juhász replied to luebbe's topic in Algorithms, Data Structures and Class Design
Before that open a ticket at Embarcadero. -
What's done for version 11 is secret only for the next two days. I believe after that @David Millington or @Marco Cantu can give you more details here or you can ask on the webinar. Unfortunately I will have to skip this product preview.
-
Re-Index a PageControl.PageIndex
Lajos Juhász replied to Henry Olive's topic in RTL and Delphi Object Pascal
If you have invisible tabsheets you cannot write anymore: XTabSheet:=PC1.Pages[TabIndex]; You've to find in a pages the index that contains the TabSheet with Tabindex. Something like this: procedure TMainForm.PC1DrawTab(Control: TCustomTabControl; TabIndex: Integer; const Rect: TRect; Active: Boolean); var XTabSheet: TTabSheet; XRect: TRect; FormColor: String; lpc: TPageControl; i: integer; begin if Active then begin Control.Canvas.Brush.Color:=$006ED7FC; Control.Canvas.Font.Color:=clBlack; end else begin FormColor :=dm.SettingsFormColor.AsString; if MatchText(FormColor,['Windows','Gray']) then Control.Canvas.Brush.Color:=$003C3838 else if MatchText(FormColor,['Brown','Light Brown']) then Control.Canvas.Brush.Color:=$0034527E; ...... end; XRect:=Rect; Control.Canvas.FillRect(XRect); //XTabSheet:=PC1.Pages[TabIndex]; lpc:=Control as Tpagecontrol; XTabSheet:=nil; i:=0; while (XTabSheet=nil) and (i<lpc.PageCount) do begin if lpc.pages[i].TabIndex=TabIndex then XTabSheet:=lpc.pages[i]; inc(i); end; DrawText(Control.Canvas.Handle, PChar(XTabSheet.Caption), length(XTabSheet.Caption), XRect, DT_VCENTER + DT_SINGLELINE + DT_CENTER); end; -
Splitting component suite = strange internal error
Lajos Juhász replied to aehimself's topic in Delphi IDE and APIs
I fought a similar problem couple of years ago. In that case for reason that the package contained too much "something" that Windows or Delphi was unable to handle after moving to newer version of Delphi. The solution was to break the package into two. -
You can also try https://github.com/EtheaDev/SVGIconImageList
-
This is a bad idea for two reasons: 1.) What will happen when the value is null? It will fail with message that Delphi cannot convert the null to string. 2.) Why would you like to find the field for every record. You should find it before wile and store it in a local variable and use that instead.
-
Why is it annoying? TGUID is not a string. You can write your function as: function GenerateAppGUID: TGuid; begin Result := StringToGUID('{481E85E5-3874-4FCB-BEA1-B65D640AE6D3}'); end;
-
Splitting component suite = strange internal error
Lajos Juhász replied to aehimself's topic in Delphi IDE and APIs
Instead of adding the units from the runtime package into the design time you should add the runtime package as required. (The 32 bit version of the runtime package must inside the path). -
How to use unit BufferedFileStream & FastCopy?
Lajos Juhász replied to Quarks's topic in General Help
Define too expensive. (WD Purple 3,5" 1TB costs about 47.58€ and it's only at 5400 RPM, the faster WD Black 3,5" 1TB costs 77,41€. For SSD we can take for example Samsung 870 QVO 1TB SSD (MZ-77Q1T0BW, SATA 6 Gb/s) costs 106.09€ for me it's not a huge difference.) -
How to use unit BufferedFileStream & FastCopy?
Lajos Juhász replied to Quarks's topic in General Help
HDD is so old. All the new fancy kids are using SSD. -
I get the problem only in design time. At run time it shows ok in the empty project.
-
It's not an error, it's how you've coded to create a new button in every paint event. Instead of that I would use the inbuild feature of the dbgrid. On you column set ButtonStyle to cbsEllipsis then you can place your in the OnEditButtonClick event of the grid.
-
upcoming language enhancements?
Lajos Juhász replied to David Schwartz's topic in RTL and Delphi Object Pascal
It's not obsolete I received as the answer from Embarcadero a couple of months ago when asked on a webinar. They feel there is no need to inform us ahead. I wonder do they actually have a plan what they would like to deliver in Delphi 11? -
The default should be populated with the values that are supplied by the OS - http://docwiki.embarcadero.com/Libraries/Sydney/en/System.SysUtils.TFormatSettings.Create
-
I cannot test this but should be: select M.LMoth, sum(Case When I.TNAME='Sell' then I.TOTAL else 0 end) as TOTALSELL , sum(Case When I.TNAME='Buy' then I.TOTAL else 0 end) as TOTALBUY FROM INVOICE I JOIN MONTHS M ON M.SMONTH=I.SMONTH WHERE CUSTNO=20 GROUP BY M.LMONTH
-
My first guess is that you're comparing the result of a 32 bit and 64 bit applications. In 64 bit Extened = Double.
-
var ldt: TDateTime; lFormat: TFormatSettings; begin lFormat:= TFormatSettings.Create; lformat.DateSeparator:='-'; lformat.ShortDateFormat:='yyyy-mm-dd'; ldt:=strtodatetime('2021-06-25 08:04:09', lFormat); ShowMessage(DateTimeToStr(ldt)); end;
-
A quick find in files returned that TJSon is implemented in the REST.Json.pas and it is not in your uses.
-
selected cell in a stringgrid FMX vs. VCL
Lajos Juhász replied to bernhard_LA's topic in Algorithms, Data Structures and Class Design
You should learn to use the help. aStatusBar.SimpleText := 'selected cell -> ' + strngrd_Point3D.Row.ToString + '/' + strngrd_Point3D.Col.ToString; -
Disable & re-Enable a Procedure
Lajos Juhász replied to Henry Olive's topic in RTL and Delphi Object Pascal
But you references the object as dm.Orders.Docno with dm that would suggest that it was from outside. In this case it should be: OrdersDOCNO.OnChange := nil; OrdersDOCNO.OnChange := OrdersDOCNOChange; -
Disable & re-Enable a Procedure
Lajos Juhász replied to Henry Olive's topic in RTL and Delphi Object Pascal
OrdersDOCNOChange is part of the datamodul: dm.Orders.DOCNO.OnChange := dm.OrdersDOCNOChange;