Defines whether the control's images are scaled to the current DPI.
Get
| C# | SftBoxScalingConstants Mode = object.ImageScaling; |
| VB.NET | Mode = object.ImageScaling As SftBoxScalingConstants |
| C++ | enum SftBoxScalingConstants Mode = object->ImageScaling; enum SftBoxScalingConstants Mode = object->GetImageScaling(); |
| C | HRESULT object->get_ImageScaling(enum SftBoxScalingConstants* Mode); |
Put
| C# | SftBoxScalingConstants object.ImageScaling = Mode; |
| VB.NET | object.ImageScaling = Mode As SftBoxScalingConstants |
| C++ | enum SftBoxScalingConstants object->ImageScaling = Mode; void object->PutImageScaling(enum SftBoxScalingConstants Mode); |
| C | HRESULT object->put_ImageScaling(enum SftBoxScalingConstants Mode); |
object
Mode
Defines whether the control's images are scaled to the current DPI.
| Name | Value | Description |
|---|---|---|
| scalingSftBoxAsIs | 0 | Draw the images at their native pixel size (the default). |
| scalingSftBoxStretch | 1 | Scale the images by the current DPI. |
The ImageScaling property defines whether the control's images are scaled to the current DPI.
The setting covers every image the control draws: item and label pictures, cell pictures, column header, row header and row/column header pictures, drop down button pictures and expand/collapse buttons. With scalingSftBoxStretch, images prepared at 96 DPI keep their physical size on a high-DPI monitor. With scalingSftBoxAsIs, the images are drawn at their native pixel size and appear smaller as the DPI increases.
See Also SftBox Object | Object Hierarchy | Per-Monitor DPI and Scaling