In my
last entry, I discussed a simple work-around for overcoming a new Delphi 2005 bug. After further review, the Bears still suck. Sorry, that probably only makes sense if you knew the story of the Packers/Bears instant replay game. See
the November 5, 1989 game on this page for more details - and yes, the replay official got it right.
Back to our PageControl story... The work-around I provided works well, but the problem is that countless other things in the VCL also fire off a request to do a RecreateWnd (e.g. setting a form's Parent). This means that you would need to do all of the things that cause RecreateWnd to be done before setting ActivePage. That's not entirely possible. Here is my new list of possible work-arounds:
- Patch the VCL to fix the new TPageControl.SetTabIndex method. Either comment out everything after inherited, or add code to take invisible tabs into consideration (a la TPageControl.GetImageIndex). This will only work if you don't use run-time packages, though.
- Create a descendant TPageControl, override the TPageControl.SetTabIndex method, and either fix the method or restore to D6 functionality (only call inherited)
- Wait for the fix in the VCL code