Delphi D2010 Component Palette icons all wrong - delphi

I have just built a new system. (Win 8.1, 64 bit, D2010). Install went fine... adding some various VCLs. For some reason, in the Delphi Component Palette, all component glyphs PAST the 'Gestures' palette are all defaulting to the 'generic' icon. The first 13 tabsheets use proper icons. The remaining 30 or so tabsheets use the generic 'Blue box, red triangle, gold circle' image.
Delphi compiles my apps fine. For some reason the GLYPHs are just messed up. I have exited Delphi, restarted, even rebooted the machine. It was initially working fine, but then it messed up. So what did I do? I installed a few components, which I have installed before... I added some help files to the Windows help system for one of the components. I added some directories to the Delphi Path, and added a new BPL file for some of the components, and I went into the Tool/Options/Component Tool Bar and moved one component from a page by itself to another page. This left an empty page/tabsheet, so I deleted it. Thinking this might be the problem, I went back in and clicked on 'Reset to Default'. It did reset the one component back to a page by itself. Restarted Delphi... same issue.
UPDATED INFO***: Some Embarcadero supplied pages show fine, others show 'Unknown/Default' Glyph. For example, the first 13 pages are good, then are 10 or so pages bad, then SAMPLES, INTERNET, and few others are good. Pages that are bad include INDY (the whole set) and IW (the whole set). All my TMS stuff is good (which I installed). Some of the JVCL pages are good, some are bad. Interestingly, one page, Jv Edits, is half bad, then the rest of the page is good.

I don't know why, but when I switched back and forth to different IDE Layouts (Default Layout, Classic Undocked, etc) a few times, the palette glyphs got reloaded, and now everything looks as it should.

Related

WebView2 (TEdgeBrowser) not working in background (if not visible on screen) - only shows as grey rectangle

I've confirmed this issue using the standard Delphi 10.4 EdgeBrowser VCL demo with the only difference that I have put the panel with the edgebrowser component on a TPageControl Tabsheet.
Now if my app starts with the Edgebrowser not visible directly on screen (because another tabsheet is active), the Edgebrowser will never fully paint on screen at any later date. It will ever only present itself as a grey rectangle and cannot recover from that, unless I call EdgeBrowser.CloseWebView; EdgeBrowser.CreateWebView; while the Edgebrowser component is visible on screen (it must be visible, or once again nothing happens).
This means I cannot issue "Edgebrowser.Navigate" commands or to anything while the Edgebrowser is in the background, on another tabsheet or while the form is hidden, or it will "go grey" again.
I wonder: Is this a bug or am I missing something major here? I tried calling Edgebrowser.Refresh and Edgebrowser.Repaint but neither help. Once it's grey, only closing and re-creating WebView helps to recover it.
It seems clear to me that this is some kind of canvas issue but I have no clue where to go from here.
I hope you can help or at least confirm this strange behaviour.
System Specs:
Delphi 10.4 Update 1 in Windows 10 Pro 20H2 in VMware Workstation 16
microsoft.web.webview2.0.9.579 from nuget and latest Edge Runtime from here (installed with bootstrap installer)
To quickly recreate the same scenario on your system:
open "C:\Users\Public\Documents\Embarcadero\Studio\21.0\Samples\Object Pascal\VCL\WebBrowser\Edge\EdgeBrowser.dproj"; cut pnlWebViewHost to the clipboard (this is the panel that contains the Edgebrowser component); insert TPageControl; add 2 tabsheets and paste the pnlWebViewHost on one of them. Switch to the other, empty tabsheet, then run the app. At runtime, click on the tabsheet with the browser which should only appear now as a grey rectangle.

Custom Component Icons Not Showing in Delphi 10.3

I just moved from Delphi 7 to 10.3 and was trying to install some of my older (VCL) custom components. I was finally successful in getting the code to compile, but I'm having trouble with something that seems like it should be trivial. The icons for the custom component(s) in the palette show what looks like a default icon instead of the icon(s) I expected. There are lots of posts on here (most are over 5 yrs old) about component icon issues and I've tried self-compiling the .rc file, including the{ $R .rc} in the package source and using the Project/Resources and Images dialog to specify the icons. I've tried 8-bit, 16-bit, 24-bit icons that are 24x24. Then as a test, I followed the exact procedure shown here which included some of the more recent content on this issue that I could find. I tried with bitmap files at full resolution and 32bpp and 24x24 at 8bpp. In both cases, the default icon showed for this test component. I'm probably overlooking something simple, but I'm kind of at a loss on what to try next. Is there a different procedure for specifying icons for custom components in 10.3 compared to older versions?
Edit: An update - I reinstalled my custom component and then rebooted and then was able to see the correct icon reflected in the palette, but here's where it gets strange. The test component I linked above still shows a default icon even after reinstalling and rebooting, and even stranger, is that the second I use my custom component on a form, the icon in the palette reverts to a TEdit icon (the component is a descendant of TEdit). Closing Delphi and reopening restores the icon until it is used again.
I'm not sure whether I should answer my own question, but just wanted to update in case it helps someone later. I was finally able to get the sample test component icon to show by using the -nocache option as described here. I then cleared the registry cache for my own component (dclusr) as shown in the same post and then also changed the bitmaps from 8bpp to 32bpp and now everything seems to be working as expected. I then cleared the registry keys for the sample project, and I can run without the -nocache option and all icons show fine, so I am thinking it was mostly a cache issue which I never would have found without the referenced post.

Delphi IDE - MainForm shrinks when I click on any control

Delphi 2010, Windows 8.1 64 bit.
I am having an oddity occur. When I am in the IDE, I have my form displayed. Every time I click on a control in the form, the form's height and width shrinks. There is NOT empty space at the bottom of the form; controls (both visible and non-visible) are being hidden. It happens on multiple projects. Has anyone seen this before? This is a new install (about 2 weeks ago). The only non-standard functionality I have is that I have both GExperts 1.3.6 installed, as well as CnPack IDE Wizards 1.0.2.666.
I do NOT get this behavior when running the application.
I have tried turning on 'Lock Controls' and this made no difference.

Delphi TListBox contents overflow when selecting (Win7, 32bit, themed)

I've a TListBox on a Windows form with 966 elements in it. When I click a button on my form, a subset of these strings are selected (roughly 200 of them).
If I now unfocus my application by clicking somewhere on the task bar, the entries from my TListBox bleed upward, so as they are visible above the boundaries of the TListBox. They are thankfully bleeding out behind the TGroupBox component which is directly above them - however this still looks extrememly unpolished.
I'm able to reproduce this only on one Win 7 x64 machine using the Aero theme (I've another Win 7 x64 laptop which doesn't exhibit the same problem with the same theme setting).
I've tried issuing a PostMessage( Self.Handle, WM_PAINT, 0, 0) directly after changing the select status, preceded by a ListBox.Refresh. This doesn't help.
Any help would be much appreciated. Please advise if you need more details.
Cheers, Duncan
Are you using the XPManifest unit, or have you enabled themes for your app? If so, try not using it to see what happens. It can be very bad if you dont have a good video card.
My 2 cents? Avoid using themes at all. It simple does not work very well.

TPanel color is black no matter what

I just activated the themes in my Windows XP (usually I work using the classic Win9x look) and I have seen that two panels are pure black. Other panels are ok (color = clBtnFace).
What these 2 panels have in common is their parent. Both are placed directly on a TForm. If I move them to a different parent (another panel for example) the have the appropriate color.
Delphi 7, win xp pro
This is another grandiose Delphi bug. I started do delete stuff from my project and recompile the project. After one hour I finally went to the main form. I deleted the XPManifest control and now, magically, the program works.
The new issue (XPMan) is discussed here: TPanel color is black when I drop a XPManifest control on my form
Edit:
Removing the XPMan is not enough. You will have to delete also the RES files. For large applications it may take a while to manually reconstruct that file. Maybe it works to big into that file and manually remove the resources added by XPMan.
Make sure the panels do not have ParentColor=false and Color=clBlack assigned to them, and that ParentBackground=true is assigned.

Resources