Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: XE5, Parentfont keeps resetting to False


This question is answered.


Permlink Replies: 13 - Last Post: Nov 26, 2015 12:34 PM Last Post By: Chris Jackson
Chris Jackson

Posts: 6
Registered: 2/10/05
XE5, Parentfont keeps resetting to False  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 23, 2015 12:41 AM
I have a weird situation here. The ParentFont property of newly-added components keeps changing to FALSE, within the IDE.

I can demonstrate it as follows:

File|New VCL Forms Application. No need to save anything.
Add 3 tLabels to the new empty form.
In turn, look at each one in the Object Inspector. The ParentFont is set to FALSE - it should be true.
Change each of the labels to ParentFont = TRUE.
Change the font size of the form, several times, and confirm that the labels change as expected.
Select one label, check its ParentFont in the Object Inspector. It's FALSE again!
Change the font size of the form again, and note that the last-inspected label doesn't change.

The problem happens with other components too - not just tLabel. Sometimes when I try to change Parentfont to TRUE, it immediately changes back. Other times it's not clear that it has changed back until I re-inspect the component.

A clean IDE, using the -rTest option on startup, behaves a little differently but the problem is still there.

This began happening after I'd been working on a substantial project with frames - however, as described, it now occurs in a very simple test project.

Does anyone have an idea what might be broken? And/or what I can do about it?
Peter Below

Posts: 1,227
Registered: 12/16/99
Re: XE5, Parentfont keeps resetting to False  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 23, 2015 11:20 AM   in response to: Chris Jackson in response to: Chris Jackson
Chris Jackson wrote:

I have a weird situation here. The ParentFont property of newly-added
components keeps changing to FALSE, within the IDE.

I can demonstrate it as follows:

File|New VCL Forms Application. No need to save anything.
Add 3 tLabels to the new empty form.
In turn, look at each one in the Object Inspector. The ParentFont is
set to FALSE - it should be true. Change each of the labels to
ParentFont = TRUE. Change the font size of the form, several times,
and confirm that the labels change as expected. Select one label,
check its ParentFont in the Object Inspector. It's FALSE again!
Change the font size of the form again, and note that the
last-inspected label doesn't change.

The problem happens with other components too - not just tLabel.
Sometimes when I try to change Parentfont to TRUE, it immediately
changes back. Other times it's not clear that it has changed back
until I re-inspect the component.

A clean IDE, using the -rTest option on startup, behaves a little
differently but the problem is still there.

This began happening after I'd been working on a substantial project
with frames - however, as described, it now occurs in a very simple
test project.

Does anyone have an idea what might be broken? And/or what I can do
about it?

This sounds like you have installed a design-time package that has
registered its own property editor for ParentFont.

I use XE5 as my main workhorse at work for several large projects and
have never noticed this behaviour (OS is Win7 32 bit, though).

--
Peter Below
TeamB
Chris Jackson

Posts: 6
Registered: 2/10/05
Re: XE5, Parentfont keeps resetting to False  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 23, 2015 1:03 PM   in response to: Peter Below in response to: Peter Below
Thanks, Peter

I do have the DevExpress components installed (Quantum Stringgrid, Devexpress Editors, Printing System), and there are some issues in Devexpress support, re behaviour of ParentFont, that make me a bit suspicious. Other components too: Jedi, TMS Advanced StringGrid, ComponentAce Absolute Database and Zipforge, MadExcept, ESBPCS.

However, this is now happening on a clean new test project, with a plain vanilla form with only a few tlabels. No 3rd-party components have been used in the test project. I'm also using the -rXXX startup that's supposed to avoid loading any 3rd-party components, although I do see the DevExpress stuff still in the tool palette for some reason. Is it possible that other components could be involved under this circumstance? If so, how would I go about isolating the problem?

I'm afraid the whole component-palette thing is a mystery to me. Can I safely experiment with adding/removing components, via Component|Install Packages, when using -rXXX, without compromising my main development environment? Can I safely try the Delphi Install/Repair, or might this affect 3rd party components?

I forgot to mention in the first post: I'm using XE5 Pro, Update 2, 32-bit compiler on Win10 64-bit OS, with a Win32 target.
Peter Below

Posts: 1,227
Registered: 12/16/99
Re: XE5, Parentfont keeps resetting to False  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 24, 2015 7:49 AM   in response to: Chris Jackson in response to: Chris Jackson
Chris Jackson wrote:

Thanks, Peter

I do have the DevExpress components installed (Quantum Stringgrid,
Devexpress Editors, Printing System), and there are some issues in
Devexpress support, re behaviour of ParentFont, that make me a bit
suspicious. Other components too: Jedi, TMS Advanced StringGrid,
ComponentAce Absolute Database and Zipforge, MadExcept, ESBPCS.

However, this is now happening on a clean new test project, with a
plain vanilla form with only a few tlabels. No 3rd-party components
have been used in the test project.

You do not need to use them, it is enough that the design-time packages
are installed in the IDE.

I'm also using the -rXXX startup
that's supposed to avoid loading any 3rd-party components, although I
do see the DevExpress stuff still in the tool palette for some
reason. Is it possible that other components could be involved under
this circumstance? If so, how would I go about isolating the problem?

Take a look at the Software branch of the registry under
HKEY_LOCAL_MACHINE. There is the key tree the -r feature uses as
template. If a 3rd-party library is registered there you will have it
in every new configuration you create.

On my system (Win10 64 bit) the relevant root entry is

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Embarcadero\BDS\17.0

I'm afraid the whole component-palette thing is a mystery to me. Can
I safely experiment with adding/removing components, via
Component|Install Packages, when using -rXXX, without compromising my
main development environment?

Yes, you only modify the configuration under the subkey named after the
-r switch.

Can I safely try the Delphi
Install/Repair, or might this affect 3rd party components?

Hard to say, I have been lucky enough with my setups in the past and
never had to repair one. I use no 3rd-party component packages that
need to be installed at all (and only one IDE add-in, MMX), only code
modules that provide objects I create in code. Much less headaches
and upgrade troubles (and costs!) this way.


I forgot to mention in the first post: I'm using XE5 Pro, Update 2,
32-bit compiler on Win10 64-bit OS, with a Win32 target.


--
Peter Below
TeamB

Chris Jackson

Posts: 6
Registered: 2/10/05
Re: XE5, Parentfont keeps resetting to False  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 24, 2015 5:48 PM   in response to: Peter Below in response to: Peter Below
Well, I've bitten the bullet and completely uninstalled Delphi and all components, firstly via Control Panel, and then removal of all the leftover files/folders I could find, plus remaining related registry keys in HKLM/Software and HKCU/Software.

Then reinstalled Delphi (Xe5 Update 2) from scratch. No 3rd-party components yet.

The problem is still there!

I have made a demo video, see here:

http://topshare.com.au/DelphiParentfontProblemDemo.avi
Lajos Juhasz

Posts: 801
Registered: 3/14/14
Re: XE5, Parentfont keeps resetting to False  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 25, 2015 9:25 AM   in response to: Chris Jackson in response to: Chris Jackson
Chris Jackson wrote:

I have made a demo video, see here:

http://topshare.com.au/DelphiParentfontProblemDemo.avi

I tried but cannot reproduce your problem. Parentfont is working
correctly.

Peter Below

Posts: 1,227
Registered: 12/16/99
Re: XE5, Parentfont keeps resetting to False  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 25, 2015 10:48 AM   in response to: Chris Jackson in response to: Chris Jackson
Chris Jackson wrote:

Well, I've bitten the bullet and completely uninstalled Delphi and
all components, firstly via Control Panel, and then removal of all
the leftover files/folders I could find, plus remaining related
registry keys in HKLM/Software and HKCU/Software.

Then reinstalled Delphi (Xe5 Update 2) from scratch. No 3rd-party
components yet.

The problem is still there!

I have made a demo video, see here:

http://topshare.com.au/DelphiParentfontProblemDemo.avi

Weird, I have no explanation for this behaviour, sorry.

--
Peter Below
TeamB
Brandon Staggs

Posts: 683
Registered: 3/3/01
Re: XE5, Parentfont keeps resetting to False  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 25, 2015 11:02 AM   in response to: Peter Below in response to: Peter Below
"Peter Below" wrote on Wed, 25 Nov 2015 10:48:52 -0800:

Weird, I have no explanation for this behaviour, sorry.

A modified TForm or TLabel class could easily do that, though that
would take someone deliberately replacing the relevant packages in the
IDE.

--
Brandon Staggs
StudyLamp Software LLC
http://www.studylamp.com
Chris Jackson

Posts: 6
Registered: 2/10/05
Re: XE5, Parentfont keeps resetting to False  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 25, 2015 8:12 PM   in response to: Brandon Staggs in response to: Brandon Staggs
I have just tried a fresh install on a clean VM (Virtualbox), Win7 -64, no 3rd party stuff, and the problem remains.

Could it be something to do with my video drivers or hardware?

I'm going to try it on a different physical machine....

Brandon: thanks for your suggestion (and same on SO) - but vcl.forms.pas has the same 2013 date as the other sources.

Edited by: Chris Jackson on Nov 25, 2015 8:16 PM

Edited by: Chris Jackson on Nov 25, 2015 8:38 PM
Chris Jackson

Posts: 6
Registered: 2/10/05
Re: XE5, Parentfont keeps resetting to False  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 25, 2015 9:55 PM   in response to: Chris Jackson in response to: Chris Jackson
Well, I give up. I have just tried on a laptop that I had set up with XE5 as a trial when I bought it 2 years ago, and it eventually displayed the same problem. It wasn't as clearcut as my video showed - when I first put the labels on the form, Parentfont was set correctly. I then moved them around and changed the form font several times, with everything behaving apparently correctly. However, eventually the Parentfont on the labels started resetting itself to False. I'm pretty sure that changing the form's font was a prerequisite for the error this time.

It looks to me as if I've had this problem all along, and maybe it is endemic in XE5. It's only recently that I've taken much notice of this property. Now I've begun trying to use Parentfont to enforce a consistent font throughout an app - and it's a different one from the design-time default. So of course it's important that most if not all components have Parentfont set to True. And I've been in the habit of changing the form font as a quick way of identifying any components that don't have Parentfont set, and I think now that this may be exacerbating the problem.

I can't believe that I'm the only one to do this sort of thing, and the only one to notice the problem in XE5, but that is certainly the way it seems at the moment - I haven't been able to google up anything similar.
Carl-Henrik Nil...

Posts: 53
Registered: 3/26/02
Re: XE5, Parentfont keeps resetting to False  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 26, 2015 12:34 AM   in response to: Chris Jackson in response to: Chris Jackson
Chris Jackson wrote:
I can't believe that I'm the only one to do this sort of thing, and the only one to notice the problem in XE5

You're not alone. I've had similar, occational, ParentFont problems with XE5.
Fortunately resorting to foul language and really insisting on setting the desired value helps.
--
C-H
Brandon Staggs

Posts: 683
Registered: 3/3/01
Re: XE5, Parentfont keeps resetting to False  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 26, 2015 5:56 AM   in response to: Chris Jackson in response to: Chris Jackson
"Chris Jackson" wrote on Wed, 25 Nov 2015 21:55:53 -0800:

I can't believe that I'm the only one to do this sort of thing, and
the only one to notice the problem in XE5, but that is certainly
the way it seems at the moment - I haven't been able to google up
anything similar.

This is definitely not normal behavior. Are you sure you are not
using a modified TForm/TCustomForm or some other modified component?

--
Brandon Staggs
StudyLamp Software LLC
http://www.studylamp.com
Tom Brunberg

Posts: 329
Registered: 12/27/04
Re: XE5, Parentfont keeps resetting to False
Correct
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 26, 2015 9:13 AM   in response to: Chris Jackson in response to: Chris Jackson
Chris Jackson wrote:

I have a weird situation here. The ParentFont property of newly-added components keeps changing
to FALSE, within the IDE.

I can demonstrate it as follows:

File|New VCL Forms Application. No need to save anything.
Add 3 tLabels to the new empty form.
In turn, look at each one in the Object Inspector. The ParentFont is set to FALSE - it should be
true. Change each of the labels to ParentFont = TRUE.
Change the font size of the form, several times, and confirm that the labels change as expected.
Select one label, check its ParentFont in the Object Inspector. It's FALSE again!
Change the font size of the form again, and note that the last-inspected label doesn't change.

The problem happens with other components too - not just tLabel. Sometimes when I try to change
Parentfont to TRUE, it immediately changes back. Other times it's not clear that it has changed
back until I re-inspect the component.

A clean IDE, using the -rTest option on startup, behaves a little differently but the problem is
still there.

This began happening after I'd been working on a substantial project with frames - however, as
described, it now occurs in a very simple test project.

Does anyone have an idea what might be broken? And/or what I can do about it?

Chris:
First I can assure you that there's nothing that you do wrong nor anything wrong with your
installation. I tried to replicate this with XE5, but did not succeed, ... at first. Then poking
around in my test it happened just like you described and showed in the video.

I thought I would check with QC and indeed...

Andreas W... reported in Quality Central on 15.1.2014:
121784 - ParentFont property is altered unexpectedly

If the Font property is expanded in ObjectInspector, the ParentFont property is altered to False.
If you are not very careful (it is necessary to collapse the Font property each time before modify
any control) then font is no longer equal the parent font.

Steps:
1. Create new VCL form.
2. Expand Font property in ObjectInspector.
3. Place a TButton on the form.
4. ParentFont of the button is set to False and can not reset to True while Font property is
expanded.

Workaround:
Collapse Font-property in objectinspector before any modifications or before store form (this is
not really a solution)

The issue is corrected in XE6, acc. the report.

Cheers

--
Tom Brunberg
firstname.lastname@welho.com

Chris Jackson

Posts: 6
Registered: 2/10/05
Re: XE5, Parentfont keeps resetting to False  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 26, 2015 12:34 PM   in response to: Tom Brunberg in response to: Tom Brunberg
Chris:
First I can assure you that there's nothing that you do wrong nor anything wrong with your
installation. I tried to replicate this with XE5, but did not succeed, ... at first. Then poking
around in my test it happened just like you described and showed in the video.

I thought I would check with QC and indeed...

Andreas W... reported in Quality Central on 15.1.2014:
121784 - ParentFont property is altered unexpectedly

If the Font property is expanded in ObjectInspector, the ParentFont property is altered to False.
If you are not very careful (it is necessary to collapse the Font property each time before modify
any control) then font is no longer equal the parent font.

Steps:
1. Create new VCL form.
2. Expand Font property in ObjectInspector.
3. Place a TButton on the form.
4. ParentFont of the button is set to False and can not reset to True while Font property is
expanded.

Workaround:
Collapse Font-property in objectinspector before any modifications or before store form (this is
not really a solution)

The issue is corrected in XE6, acc. the report.

Cheers

--
Tom Brunberg
firstname dot lastname at welho dot com


Tom, thanks so much. It's good to know that I'm not going crazy!

Now that it's been explained, I should be able to work around it.

Thanks and cheers,
Chris
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02