Mega Search
23.2 Million


Sign Up

Make a donation  
ItemHeight property??  
News Group: embarcadero.public.delphi.ide

I am switching my project back and forth between D2007, D2009 and XE5
when trying to get stuff working.
It turns out tha the dfm files chage without me doing anything
knowingly.
In most cases there are insertions or removals of a property
ItemHeight for a lot of controls.

Could someone explain what is the deal here and how one can make a
project sources work properly in several versions of Delphi?

Vote for best question.
Score: 0  # Vote:  0
Date Posted: 14-Jan-2015, at 1:01 PM EST
From: Bo Berglund
 
Re: ItemHeight property??  
News Group: embarcadero.public.delphi.ide
On Thu, 15 Jan 2015 00:43:16 -0800, Lieven Vandaele
 wrote:

>Mitecs DFMEditor is the best to go from XE5 back to Delphi 2009, 2007(I 
>think so) it shows you the lines to remove and it has a form preview(this 
>preview explains what to remove inside the .dfm)
>I used it when I tried XE5 and went back to Delphi2010.

Thanks,
I'll take a look and see if it can help me.

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 15-Jan-2015, at 4:51 AM EST
From: Bo Berglund
 
Re: ItemHeight property??  
News Group: embarcadero.public.delphi.ide
Mitecs DFMEditor is the best to go from XE5 back to Delphi 2009, 2007(I 
think so) it shows you the lines to remove and it has a form preview(this 
preview explains what to remove inside the .dfm)
I used it when I tried XE5 and went back to Delphi2010.



"Bo Berglund"  wrote in message 
news:709415@forums.embarcadero.com...
>I am switching my project back and forth between D2007, D2009 and XE5
> when trying to get stuff working.
> It turns out tha the dfm files chage without me doing anything
> knowingly.
> In most cases there are insertions or removals of a property
> ItemHeight for a lot of controls.
>
> Could someone explain what is the deal here and how one can make a
> project sources work properly in several versions of Delphi?

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 15-Jan-2015, at 12:43 AM EST
From: Lieven Vandaele
 
Re: ItemHeight property??  
News Group: embarcadero.public.delphi.ide
On Wed, 14 Jan 2015 16:10:10 -0800, Remy Lebeau (TeamB)
 wrote:

>Bo wrote:
>> I think I need to go back to D2009 for my unicode stuff
>
>Why?
Because it will bring as small a change as possible for my projects
since 2009 is the next version following 2007 and therefore possibly
stuff that works in 2007 continues working in 2009 while there might
pop up other issues if moving all the way to XE5.

>
>> and I must commit the changes I did in XE5 to make the project
>> buildable, so I diffed the dfm files and found the ItemHeight issue.
>
>And why is it an issue for you?  If XE5 does not save the ItemHeight to the 
>DFM, D2007 will simply use its default value of 16.

Well, I am suspicious of changed files when I did not do anything to
the forms myself, did not even open them. I just worked over the
DecimalSeparator thing (something like a hundred cases in the pas
files). Normally the IDE should only save over the old file if a
change has been made.
In this case I made a CVS diff against the start version to see what
had been done and found the ItemHeight property and I really wanted
the project to load in earlier versions (D2009 in this case).

As it is now I took out the ItemHeight lines before committing.

But of course I was hit by another problem (the missing TSpinEdit in
D2009)....

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 14-Jan-2015, at 11:01 PM EST
From: Bo Berglund
 
Re: ItemHeight property??  
News Group: embarcadero.public.delphi.ide
Bo wrote:

> The strange thing is that the XE5 dfm files are MISSING the ItemHeight
> property which is present in CVS, hence in D2007....

ItemHeight is a little special (and quirky), depending on which component 
you are you using.

For a ComboBox, TCustomCombo saves the ItemHeight to a DFM only if its value 
is not 16.  TComboBox then extends that logic by saving the ItemHeight only 
if the added condition that the Style is csOwnerDrawFixed or csOwnerDrawVariable. 
 TComboBoxEx, on the other hand, does not do that extra step.

For a ListBox, TCustomListBox saves the ItemHeight to a DFM only if its value 
is not 16.  TListBox does not extends that logic.

> I think I need to go back to D2009 for my unicode stuff

Why?

> and I must commit the changes I did in XE5 to make the project
> buildable, so I diffed the dfm files and found the ItemHeight issue.

And why is it an issue for you?  If XE5 does not save the ItemHeight to the 
DFM, D2007 will simply use its default value of 16.

--
Remy Lebeau (TeamB)

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 14-Jan-2015, at 4:10 PM EST
From: Remy Lebeau (TeamB)
 
Re: ItemHeight property??  
News Group: embarcadero.public.delphi.ide
On Wed, 14 Jan 2015 13:28:12 -0800, Remy Lebeau (TeamB)
 wrote:

>Bo wrote:
>
>> Could someone explain what is the deal here and how one can make
>> a project sources work properly in several versions of Delphi?
>
>DFMs are not very interchangable between multiple Delphi versions.  Older 
>DFMs can be used in newer versions, but newer DFMs cannot (usually) be used 
>in older versions, as new versions tend to add new properties that ause streaming 
>problems in older versions.  There are some 3rd party tools floating around 
>that strip out newer properties when downgrading a DFM for use in an older 
>version.  Look around for those.

Right now I am looking at diffs to CVS versions for a number of dfm
files in a sandbox where I have compiled and tested the application
with XE5.
The files in CVS were all committed in December when I worked on
adding language items into the project. That was done using Delphi
2007.
The strange thing is that the XE5 dfm files are MISSING the ItemHeight
property which is present in CVS, hence in D2007....
I am looking over this because I think I need to go back to D2009 for
my unicode stuff and I must commit the changes I did in XE5 to make
the project buildable, so I diffed the dfm files and found the
ItemHeight issue.
But if I commit then this property will be taken out, which is
probably OK for D2009 then.
The final goal is to move everything to XE5, so this is a temporary
backstep while trying to get GLScene working properly.

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 14-Jan-2015, at 1:42 PM EST
From: Bo Berglund
 
Re: ItemHeight property??  
News Group: embarcadero.public.delphi.ide
Bo wrote:

> Could someone explain what is the deal here and how one can make
> a project sources work properly in several versions of Delphi?

DFMs are not very interchangable between multiple Delphi versions.  Older 
DFMs can be used in newer versions, but newer DFMs cannot (usually) be used 
in older versions, as new versions tend to add new properties that ause streaming 
problems in older versions.  There are some 3rd party tools floating around 
that strip out newer properties when downgrading a DFM for use in an older 
version.  Look around for those.

--
Remy Lebeau (TeamB)

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 14-Jan-2015, at 1:28 PM EST
From: Remy Lebeau (TeamB)