RichText error - Control has no parent window
Hi
I have successfully converted a number of my applications from Delphi XE2
and RB 14.07 to Delphi XE7 and RB 16.03 (Ent) but i am having a major
problem with one conversion. Whenever a RichText or dbRichText component is
used in a report i get the following error: Control '' has no parent window.
I get this message regardless if a report is loaded from file or the
component is added via designer. The error only occurs with the use of
richtext controls and no other.
For testing purposes I added a new clean form to the project with just a
ppDesigner, ppReport (default settings) and a button that called
ppDesigner1.ShowModal. I made no changes to the uses section of the form
and did not use any other forms. The designer when run will allow all
components to be added other than richtext.
I do not have the problem with a dozen other applications (using similar
code) i have converted and a brand new application causes no problem. It is
just with this one application. I do use a number of third party controls
so attempting to identify the problem i copied all the uses section from my
problem application to one that works. It made no difference in that the
good application continued to work.
Any suggestions
Tim Murfitt
I have successfully converted a number of my applications from Delphi XE2
and RB 14.07 to Delphi XE7 and RB 16.03 (Ent) but i am having a major
problem with one conversion. Whenever a RichText or dbRichText component is
used in a report i get the following error: Control '' has no parent window.
I get this message regardless if a report is loaded from file or the
component is added via designer. The error only occurs with the use of
richtext controls and no other.
For testing purposes I added a new clean form to the project with just a
ppDesigner, ppReport (default settings) and a button that called
ppDesigner1.ShowModal. I made no changes to the uses section of the form
and did not use any other forms. The designer when run will allow all
components to be added other than richtext.
I do not have the problem with a dozen other applications (using similar
code) i have converted and a brand new application causes no problem. It is
just with this one application. I do use a number of third party controls
so attempting to identify the problem i copied all the uses section from my
problem application to one that works. It made no difference in that the
good application continued to work.
Any suggestions
Tim Murfitt
This discussion has been closed.
Comments
After more testing i have found the problem. To avoid having to install the
midas.dll (for clientdatsets) i add MidasLib to the uses of my application
source. If it is added prior to Forms and Windows then the problem occurs.
If after (or not used) then there is no problem. Five very stressful hours
caused by one silly line!
Works ok:
program SerVantage;
uses
Forms,
Windows,
MidasLib,
MasterForm in 'MasterForm.pas' {FormMaster},
AboutForm in 'AboutForm.pas' {FormAbout},
etc.....
Does not work ok:
program SerVantage;
uses
MidasLib,
Forms,
Windows,
MasterForm in 'MasterForm.pas' {FormMaster},
AboutForm in 'AboutForm.pas' {FormAbout},
etc.....