Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

DefaultItemHeight in TElListBox doesn't work

The new Property DefaultItemHeight doesn't work.

If set to true, the value isn't stored in dfm.
On the next load, only the ItemHeigth-Property is restore from dfm and property is set to false.
This causes too small ItemHeight on Systems with "Big Fonts"/HighDPI-Settings :-(

Remove default-Value or avoid writing of ItemHeight in case of DefaultItemHeight=True.

Comments

  • 7 Comments sorted by Votes Date Added
  • edited December 2017 Posts: 78Vote Up0Vote Down
    You also have to think about old stored formes where DefaultItemHeight doesn't exists.
    i think, in this case, you have to restore TElListBox as this property is set to true.
  • You also have to check/modifies other units (like ElDTPick) where you explizit set ItemHeight  := 13.
    This will also have to be modified to work korrect with big fonts.
  • The new implementation causes still problem with existing dfm-Files.
    For new forms, its ok.

    For old, it loads ItemHeigth out of the dfm and  sets DfeaultItemHeight to false.
    And with this, the heigth is too smal for high-dpi :-(
  • If ItemHeigth is stored in dfm, it will be defnitely loaded. There no other way.
  • edited January 16 Posts: 78Vote Up0Vote Down
    There must be a other way!

    Now i have the problem that with this new property i have to open all form in IDE, sest DefaultItemHeight to true and save it.
    And I have more than 100 Forms to change.

    And all of the other user of ElPack doesn't know that the have to open the files and save it with DefaultItemHeigth = True.
    They wil get informed from there customer that the new version doen't work on High-DPI-PCs any more


  • I'm sorry, but the current way is the right way! It does not break backward compatibility, and no old apps will work differently, than before. Using system font is NEW functionality, and so, its required to set it up explicitly (to prevent backward compatibility break). There are no other way.
  • However, you can search for dfm files with "ItemHeight =" string and remove it manually in text editor. I guess, this will not be so hard.
Sign In or Register to comment.