Tom F 85 Posted August 13, 2022 (edited) When using a style (e.g.Windows10), the dialog that is displayed by the code below is not resizable. (i.e. There is no handle in the lower right corner with which to drag the window larger.) When using the default Windows style or removing the Options line from the code, there is no problem. We had hoped to start using styles in our app, but a bug like this is discouraging. var SaveDialog1: TSaveDialog; begin SaveDialog1 := TSaveDialog.Create(Self); SaveDialog1.Options := [ofOverwritePrompt]; // removing this line eliminates the problem SaveDialog1.Execute; SaveDialog1.Free; end; Windows 10, D11.1, 32-bit app. Reported here https://quality.embarcadero.com/browse/RSP-38868 Edit: I decided to add a screen capture showing the missing grab handle to resize. I've noticed that when using a style, the dialog box that is missing the grab handle is a different type. It has icons on the left rather than a directory tree. It appears that the VCL Styles changes the dialog box type. What's the difference? Is there a way to show the "old style" (with a tree) when using styles?? Edited August 13, 2022 by Tom F Share this post Link to post
Renate Schaaf 64 Posted September 14, 2022 On 8/13/2022 at 3:56 PM, Tom F said: Is there a way to show the "old style" (with a tree) when using styles?? You can add the following line e.g. in the OnCreate of the main form: TStyleManager.SystemHooks := TStyleManager.SystemHooks - [shDialogs]; VCL.Themes needs to be in the uses list. The drawback is, that the style is also removed from all message dialogs. But I find it easier to make your own message boxes than your own file dialogs. Share this post Link to post
Uwe Raabe 2064 Posted September 14, 2022 On 8/13/2022 at 3:56 PM, Tom F said: Is there a way to show the "old style" (with a tree) when using styles?? Actually, the tree style dialog is the new one. The drawback of the new ones is that they cannot be styled, because they are completely handled by Windows. TSaveDialog tries to use the newer dialog when possible. With styles active it is just not possible and the old style dialogs are used. Besides the hint from Renate you can force the (unstyled) new dialog when you replace the TSaveDialog with a TFileSaveDialog. Share this post Link to post
dwrbudr 8 Posted September 15, 2022 They can be styled using VCL Styles Utils project. It uses DDetours to intercept WinAPI calls and set the colors/glyphs/etc. according to the current style. https://github.com/RRUZ/vcl-styles-utils Share this post Link to post