-
Content Count
1977 -
Joined
-
Last visited
-
Days Won
26
Everything posted by Attila Kovacs
-
As the *UISTATE messages are poorly implemented in the VCL, actually it's just a : procedure TWinControl.WndProc(var Message: TMessage); . if Message.Msg = WM_UPDATEUISTATE then Invalidate; // Ensure control is repainted without storing and checking against the actual UI state, nor checking the wparam if it's only a UIS_INITIALIZE, raises the question: For what the heck is this Invalidate there? Because it causes a bunch of flickering on pressing the "alt"-key or on calling InsertControl(). What regression will I have if I'm overriding this message in my common TForm like: procedure ChangeUIState(var Message: TMessage); message WM_CHANGEUISTATE; procedure TCForm.ChangeUIState(var Message: TMessage); begin // do nothing end; except a faster GUI, no flickering, smoother form-parenting!?
-
@KodeZwerg Not bad at all! I'm too tired 😉
-
Okay, there is no more such setting in W10, but I found something interesting: There seems to be a problem with THEMES support in Delphi, in which TButton, TCheckBox, TRadioButton and TStaticText standard controls vanish in VISTA when the ALT key is pressed. (only TStaticText vanishes in XP). If the OS is set to default, pressing the ALT key in XP and Vista has the behavior of displaying the underline under the accelerator keys. The mentioned controls vanish the first time ALT is pressed. They can be restored by repainting the control in code. Once restored, they are not affected by subsequent ALT key presses -- unless a pagecontrol on the form changes to a new tabsheet, then all affected controls, both on the tabsheet and on the form, will vanish on next ALT press. Due to the pagecontrol issue there is no way to set a flag to do the repaint op only once. In MDI applications, an ALT key press has the same affect on all child forms at the same time ** End quote ************** Looks like it's all because of those bugs in XP and Vista. Now how would it be possible to keep the backward compatibility but not calling Invalidate on > Vista and not checking the OS version in a WndProc?
-
I'm not sure whether it's even worth further debugging. I just got an email from quality emba that they are unable to reproduce this: https://quality.embarcadero.com/browse/RSP-20010 and there is also this: https://quality.embarcadero.com/browse/RSP-15109 The whole unit is a mess. (And I don't think they fixed it. Did they? 10.4.2 anyone?)
-
@KodeZwerg Hmm, now that you say, I think there is an option somewhere in windows where you can tell if the accelerator keys are by default drawn or only on pressing the alt-key. Maybe. I don't know. Because they are drawn by me all the time (on buttons etc..) and the menus are just working fine without the Invalidate. So I can't find the regressions, otherwise I could debug and implement a proper handling by storing the form's UI state and call Invalidate if needed. Thx.
-
Inch representation format in TEdit like controls
Attila Kovacs replied to Cristian Peța's topic in General Help
Yeah, thx. We found a bug in the RTL/VCL and a better way to communicate. I see no offensive material. -
Inch representation format in TEdit like controls
Attila Kovacs replied to Cristian Peța's topic in General Help
It will be the system default by default. So in my case it's __ __.__ Looks like a bug in MaskEdit -
Inch representation format in TEdit like controls
Attila Kovacs replied to Cristian Peța's topic in General Help
bug -
Inch representation format in TEdit like controls
Attila Kovacs replied to Cristian Peța's topic in General Help
There must be a bug in Delphi as "\/" does not make a literal from "/" but instead converts it to the system's date separator. Buhh. Anyway, what if the user just want to enter 12"? -
Micro optimization: Split strings
Attila Kovacs replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
@Fr0sT.Brutal It won't be compatible with other systems. Also, .Split() accepts Option flags, there could be an IgnoreLastEmpty for that case. -
@balabuev Could you figure it out what is happening there? It's not clear for me based on that workaround.
-
Micro optimization: Split strings
Attila Kovacs replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
Yet again? 🙈 -
Micro optimization: Split strings
Attila Kovacs replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
interesting how Split() interpretations differ: //Delphi RTL sp := 'qq;ww;ee;'.Split([';']); // => ['qq', 'ww', 'ee'] // My test case arr := Split('qq;ww;ee;'); // => ['qq', 'ww', 'ee', ''] This in python and in php returning also ['qq', 'ww', 'ee', ''], and so would I expect. -
there is a fat 26% discount on D until 28. Feb, so start testing!!! 😉
-
Sorry, I thought calling destructor TWinControl.Destroy; is equal to destroying a component. my bad
-
You can achieve the same with two TListView's on the same parent, like a TPanel, both having one node. There is something with FTempItem or I don't know, TSubItems' constructor and destructor is not called the same time (4/3), I have no more time for debugging and I don't want to see this code anymore. I can't believe that on a theme change you have to destroy and create a component 4 times in a row.
-
reproduced with Berlin U2
-
Micro optimization: Split strings
Attila Kovacs replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
@Fr0sT.Brutal cool, this also helped me to spot some bugs in my enum version. do you have a unit test for it? -
an MCVE would be nice as we could figure out which version are affected and also debug it instead of guessing
-
Do we know wich Delphi versions are affected?
-
XLS 2 XLSX
Attila Kovacs replied to DrShepard's topic in Algorithms, Data Structures and Class Design
Sorry, it's "--outdir", you can check the parameters with "--help". Yes, *nix style. That's why the "*.xls" also doesn't work. (<o> free software) You can also create a batch file with "for in" and call that. https://ask.libreoffice.org/en/question/253696/using-wildcards-for-windows-command-line-batch-convert/ -
Max string literal length = 255
Attila Kovacs replied to Lars Fosdal's topic in RTL and Delphi Object Pascal
can we ban this clown @Lars Fosdal? -
Read and reapply design time properties to specific controls - runtime
Attila Kovacs replied to aehimself's topic in VCL
He also mentions that he is successfully hides/resizes/rearranges those components. That said, I can't see any problem to reset them. Also, I trust him fully that he knows what he is doing. -
Read and reapply design time properties to specific controls - runtime
Attila Kovacs replied to aehimself's topic in VCL
@balabuev TWinControl.DisableAlign may help there -
Read and reapply design time properties to specific controls - runtime
Attila Kovacs replied to aehimself's topic in VCL
If there are some non-standard written controls which has to be restored, yes, you are right, it would need it's reader. On standard controls you can skip the data you don't need or you don't know. We can't see this from here. Nor the actual software to be able to decide which would be less effort, storing local the initial values or reading the dfm. I wanted to show him how to read the resources by its classtypes and read some properties, which he asked.