Delphi 2010 object inspector grid and windows dpi - delphi

I work on high resolution wide screen and I set the dpi to 144 so I can see fonts better.
the problem in Delphi 2010 object inspect grid I cant see the text of properties or event names the grid does not scale !!
any solution to this ?
thank

After read your post I asked Uwe Schuster if would be possible to fix this issue with their great "Object Inspector Expert" and he did.
You can download it here:
http://www.bitcommander.de/blog/index.php/2012/07/15/oi-rev-5/

Related

Column titles of dataframes very small in Spyder since update

I have been using Spyder for Python and since an update the column titles of a dataframe in the variable explorer are quite small and I don't know how to change that. Before the update the size was good.
Here is a screenshot
Any idea how I can change that?
Disabling the option "Enable auto high DPI scaling" as hinted at by Carlos Cordoba:
That's weird. Are you using a high resolution screen?
and confirmed by PeterBe:
I disabled the option "Enable auto high DPI scaling" in the preferences menu and now it looks quite good. Thank you for the hint Carlos with the high resolution screen
in the comments worked for me.

Visual bug in Windows title bar with VCL Styles enabled application and display scaling

Currently I am testing various aspects of VCL styles enabled applications.
I noticed, that with Windows scaling higher than the default 96 dpi/100%,
the icon and the title bar text of the VCL Form are too big in size - and both are to close together -, please see attached screenshots. This is especially true with higher scalings like 200% or 250% (e.g. used on 4K displays and Windows 10), but even with a scaling of 144 dpi/150%, the problem is already visible.
This is true for all styles delivered with RAD Studio. High Dpi awareness for manifest is enabled via project settings.
If I disable VCL Styles in the App, the icon and title bar text is correct in size.
Am I missing something here? Shouldn't the delivered styles work without such display errors out of the box with display scaling enabled? Or is there some setting somewhere I can adjust to fix this.
Thanks,
VCL Styles do not properly support high DPI scaling.
If you use VCL Styles, then you should remove high DPI awareness from your application manifest.
QP report requesting general high DPI support for VCL Styles:
VCL styles don't scale properly under high DPI configurations
Related QC Report for NC area: Styled form's non-client area incorrectly scaled under High DPI
Ok, here is my solution for the visual bugs, please see the attached screenshots. I did fixes in 3 places in Vcl.Forms.pas.
The first fix, commented with // Title bar fix 1, addresses the problem that the icon is not correctly drawn, even without scaling, on a default 96dpi Windows with a VCL styled application. I could fix this based on the findings about WM_GETICON, ICON_SMALL2, from James Johnston,
https://stackoverflow.com/a/35067909
thanks, James, for that!
The other two fixes address the problem that the icon is drawn too big with display scaling enabled, and that the distance between the icon and the title bar text is too small. These are the fixes commented with // Title bar fix 2 and 3 in the code.
GetDpi is just a getter for the current dpi value, which I get from my C sources within the application.
The result is in no way perfect, but it will do for now, with this the VCL styled application is at least acceptable under scaled circumstances.
Thanks to all for your input.
Here is a unit that allows VCL styles in DPI-aware applications.
VCL.Styles.DPIAware.pas
To use the unit just add it to the implementation uses statement of the main form and add the following code to the FormCreate handler.
procedure TFrmMain.FormCreate(Sender: TObject);
Var
StyleDPIAwareness : TStyleDPIAwareness;
begin
StyleDPIAwareness := TStyleDPIAwareness.Create(Self);
StyleDPIAwareness.Parent := Self;
By default the component scales the styles at multiples of 100%. You can change that, by adding the line:
StyleDPIAwareness.RoundScalingFactor := False;
With this statement styles are scaled to whatever scaling factor results for Screen.PixelsPerInch. Most of the styles would work fine, but a few may show some visual defects.

TChart quality issue

We were using Delphi 2010 with the full VCL edition of TeeChart this worked fine
We have now updated to Delphi XE 5 with the latest version of TeeChart and the quality of the charts is now worse
Please see the image here
2 bars which were seperate are now merged into 1 bar
If I make the charts wider which is not an option it looks better but still not as good as before
Please see here
Has anyone come across any issue like this?
The projects are here for Delphi XE5 and here for Delphi 2010
The search paths may need modifying
Cheers
Paul
The issue might be because of the anti-aliasing function being turned on by default in the newer versions of TChart(!).
We had the same issue with a line series graph.
After writing to the vendor (Steema) they came up with the following solution:
Chart1.Canvas := TTeeCanvas3D.Create; //Disable GDI+ to prevent smooth drawing of the graph.
I don't get why we have to switch off drawing with GDI+ as - to my knowledge - GDI+ can also be used without anti-alias.
Anyway, our graphs now behave like the previous versions of the TChart, which is what we want.
I was also hating the "new" anti-aliased charts that are blurry and slow.
It's pretty easy to fix, when you know where to search for.
Double-click on chart, then go to 3D -> Render -> select GDI instead of GDI+
If you look "behind the scenes" into DFM file you can see the change:
Crisp and fast graph (as in 2010): DefaultCanvas = 'TTeeCanvas3D'
Blurry and slow graph (as in XE5): DefaultCanvas = 'TGDIPlusCanvas'
chart settings
Hope this helps.
Some kind of a clumsy runtime workaround was found here, that is also working:
http://www.teechart.net/support/viewtopic.php?f=3&t=15078

Adjust size of a font in Print Preview MS Project 2010

Having a hard time with printing reports or anything in MS Project 2010. Font is too Small almost non existent (like little dots). Zooming in 300% reveals that data is there bud not readable otherwise. Please help
Screen
It took me a bit to figure this out and I'm on version 2016. You need to add the Font Size control to the ribbon. This allows you to select objects, such as a table, in the report and modify the font of the entire table.

Ugly "disabled" images of TMainMenu

Delphi 2010, Win32 VCL. I need to create a main menu for my application with the most standard look. TMainMenu looks nice in all Windows versions, the only bad thing is when it displaying images for items with Enabled=False.
Delphi has some strange method for building that disabled images (b/w extrusion with bevels, for me it looks like spew). I want to make a patch for that procedure in VCL sources and let menu to select disabled images from the same TImageList, but I can't find it.
Is it exists at all or it is some standard windows API call? Do you know where is that procedure located?
Sure OwnerDraw style can fix all this but I want a bit faster solution.
There's a great post on Galfar's Lair blog which describes the problem, and has code for a workaround, overriding the TImageList DoDraw method.
Here's the pic (linked) showing the 'before' and 'after'.
I think this relates to pretty much all Delphi versions.
If you can provide your images as PNG you can use TPngImageList from PngComponents. It has different options to make a blended or grayscaled disabled image. The PNG format allows you to make use of alphablending.

Resources