Board index » delphi » Small fonts - Large fonts

Small fonts - Large fonts

I have developed an application using small fonts.  When my app is run
using Large fonts the columns in the TDBGrid do not line up with
other TEdit controls on the form.  
Is the a fix to disable Large fonts, or some other way to rectify this
problem.

Thanks in advance

 

Re:Small fonts - Large fonts


Quote
Darren wrote:

> I have developed an application using small fonts.  When my app is run
> using Large fonts the columns in the TDBGrid do not line up with
> other TEdit controls on the form.
> Is the a fix to disable Large fonts, or some other way to rectify this
> problem.

> Thanks in advance

One solution is to specify all of your fonts as explicit named fonts,
such as Arial, that do not change when small fonts/large fonts changes.
Some of the default fonts, such as System, change under those
circumstances.

--
Howard L. Kaplan
Psychopharmacology and Dependence Research Unit
Women's College Hospital
76 Grenville Street, 9'th floor
Toronto, Ontario
Canada  M5S 1B2
(416)323-6400, ext 4915
howard.kap...@utoronto.ca

Re:Small fonts - Large fonts


Darren <dar...@scs.com.au> wrote in article <33a4c45c.642499@chakotay>...

Quote
> I have developed an application using small fonts.  When my app is run
> using Large fonts the columns in the TDBGrid do not line up with
> other TEdit controls on the form.  
> Is the a fix to disable Large fonts, or some other way to rectify this
> problem.

this works for me:

I set the Scaled property of the form True. This takes
care of the scaling of the form and its controls + their
position on te form. Then I adjust the column widths and
row height from the code at runtime. The width of the right most
column is adjusted to fill the grid exactly, using the
accumulated widths of the other columns, the grid line
width and the client width of the grid. This is to avoid that
due to rounding errors the client area of the grid is wider
than the grid.

Disabling Large Fonts does not seem a good idea to me, since
the user will have a good reason to select this option. Furthermore
it would require windows to be re-started.

Wim

Other Threads