[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Themes' (#lcl)

# TThemeServices.GetDetailSizeForPPI

Gets the dimensions for a theme element scaled to the specified Pixels per Inch (PPI).

## Declaration

Source position: themes.pas line 482

`public function TThemeServices.GetDetailSizeForPPI(`
`Details: TThemedElementDetails;`
`PPI: Integer`
`):TSize; virtual;`

## Arguments

`Details` |  | Identifies the element, part, and state for the requested themed element.
`PPI` |  | Pixels per Inch used to scale size values in the theme element.

## Function result

TSize instance with the Width and Height for the specified theme element detail.

## Description

GetDetailSizeForPPI is a TSize function used to get the dimensions for a theme element detail scaled to the display density specified in PPI.

Details contains the theme element, part, and state values which identify a themed element or one of its constituent parts.

PPI contains the Pixels per Inch values used to scale the size for the theme element. It is used to generate a scaling factor that converts values from 96 PPI (used at design-time) to the given PPI setting. PPI normally contains the PixelsPerInch setting for the monitor where the themed element is displayed.

The return value is a TSize instance which contains the Width (in cx) and the Height (in cy) for the themed element detail scaled to the given PPI setting. When cx and cy are set to -1, this indicates that the size for the themed element is not known. This can occur if Details has an unknown value in its Element or Part members.

Themed Elements and Parts

teButton
  Part allows: BP_RADIOBUTTON, BP_CHECKBOX, or BP_PUSHBUTTON.
teRebar
  Part allows: RP_GRIPPER or RP_GRIPPERVERT.
teToolBar
  Part allows: TP_SPLITBUTTONDROPDOWN or TP_DROPDOWNBUTTON
teTreeView
  Part allows: TVP_GLYPH or TVP_HOTGLYPH.
teWindow
  Part allows: WP_SMALLCLOSEBUTTON, WP_MDICLOSEBUTTON, WP_MDIHELPBUTTON, WP_MDIMINBUTTON, WP_MDIRESTOREBUTTON, or WP_MDISYSBUTTON.
teHeader
  Part allows: HP_HEADERSORTARROW

## Version info

Added in LCL version 3.0. Replaces the deprecated GetDetailSize method.

## See also

TThemeServices.GetDetailSize |  | Deprecated. Use GetDetailSizeForPPI instead.
TThemedElementDetails |  | Record type with a theme element, part, and state values.
TThemedElement |  | Represents elements which can be themed.
ScreenInfo |  | Contains display attributes for the current screen in an application.
TScreenInfo |  |
TSize