Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2007.01.21;
Скачать: CL | DM;

Вниз

MHFontDialog return bad font height   Найти похожие ветки 

 
Dodfr   (2006-04-06 14:11) [0]

Hello,

When I try to retrieve the selected font size value after MHFontDialog.execute, I get wrong value, always a bit bigger that selected one : if I select 8 size then I get 11, if I select 14, then I get 19.

Any idea ?

Thanx


 
Grom PE ©   (2006-04-06 14:27) [1]

It is font height, not font size.
I don"t know is there any conversion function for this.


 
ECM ©   (2006-04-06 15:54) [2]

http://delphimaster.net/view/11-1124270752/


 
Dodfr   (2006-04-06 16:31) [3]

Nice, thank you (I did a search in forum for "MHFontDialog" before asking but did not thought searching on "font.height") , just have to change the

MyHeight := -10 * PixelsPerInch / 72;

to

MySize := -10 / (PixelsPerInch / 72);

To get Height to Size conversion, strange that MHFontDialog do not include such usual property that is part of the font dialog elements like the Name or Style.


 
ECM ©   (2006-04-06 16:41) [4]


> I did a search in forum for "MHFontDialog" before asking
> but did not thought searching on "font.height

Not all so is simple
:))

http://delphimaster.net/view/11-1124270752/


 
Dodfr   (2006-04-06 17:51) [5]

Sorry ECM, your link is russian, I don"t read it but I see a link in the thread that also point to http://delphimaster.net/view/11-1124270752/


 
ECM ©   (2006-04-06 18:10) [6]

Life cycle of threads in a forum:
Cashe(accessible)->Trash(not accessible)->Archives(now accessible)
Link  http://delphimaster.net/view/11-1124270752/ was trashed and search in what would not result.... :)
Tnx McSimm - untrash it


 
thaddy   (2006-04-06 20:26) [7]

Use getsystemmetrics and add 2. Then you are almost always very close.


 
thaddy   (2006-04-06 20:28) [8]

plz ignore last post.



Страницы: 1 вся ветка

Текущий архив: 2007.01.21;
Скачать: CL | DM;

Наверх




Память: 0.48 MB
Время: 0.08 c
15-1167147562
Ученик чародея
2006-12-26 18:39
2007.01.21
За поиск НЛО в сетях пентагона хакеру грозит 70 лет тюрьмы.


2-1167371820
hero
2006-12-29 08:57
2007.01.21
Как имея ID процесса узнать имя файла и путь этого процесса?


15-1165937364
GrayFace
2006-12-12 18:29
2007.01.21
Версии Delphi. А также вопрос к тем, у кого Delphi более, чем 7


15-1167337972
Expell
2006-12-28 23:32
2007.01.21
Наверно, баян


15-1167224986
DelphiLexx
2006-12-27 16:09
2007.01.21
Что такое +jt