The Metrics Section
The Metrics section represents numeric
data in the Language file and has the following structure:
<Metrics>
<Metric id="IDS_MYMETRICID" factor="X">#,#,#,#</Metric>
...
</Metrics>
An example of numeric data that depends on the currenly selected language
might be the size and/or position of a control in the KO Approach Options
dialog box.
Each metric is represented by an Identifier,
a Factor value and a sequence of numbers
separated by commas. A Factor is the quantity
of numbers that the metric can store. Approach currently supports up to four
values. Hence the maximum factor is four.
Althought a metric with the factor of 3 is a valid metric, Approach
does not use such metrics anywhere. This behavior might change in the
future versions of Approach.
Most of the metrics define the size and/or position of a control in the
Approach Options dialog box. The data in such metrics is measured in
Dialog units. Approach converts Dialog units to screen units internally
while processing the metric.
By convention, metrics with the factor of two define the size of a window.
For example, the Metric below specifies the size of the Options dialog box
(in Dialog units):
<Metric id="IDM_OPTIONSDLG" factor="2">260,266</Metric>
Metrics with the factor of four define the size and position of a window.
The first two fields specify the X- and Y-coordinate values respectively,
and the last two fields specify Width and Height (in Dialog units).
<Metric id="IDM_AUTORUN" factor="4">18,65,165,10</Metric>
Controls displaying icons, are not sized. Their size is specified internally
to 32 pixels. Metrics for such controls must have the Factor of four
but the last two fields must be equal to zero, as shown below:
<Metric id="IDM_PROGRAMICON" factor="4">13,13,0,0</Metric>
|