• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
      • Introduction to CSPro Language
      • Data Requirements
      • CSPro Program Structure
      • Programming Standards
      • Code Folding
      • Debugging CSPro Applications
      • Declaration Section
      • Procedural Sections
      • Logic
      • Language Elements
        • Version
        • Delimiters
        • Comments
        • Preprocessor
        • Variables and Constants
        • Expressions
        • Operators
        • Files
        • Miscellaneous
          • Display Dimensions
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • Data Sources
    • CSPro Statements and Functions
    • Templated Reporting System
    • HTML and JavaScript Integration
    • Action Invoker
    • Appendix
  • <CSEntry>
  • <CSBatch>
  • <CSTab>
  • <DataViewer>
  • <TextView>
  • <TblView>
  • <CSFreq>
  • <CSDeploy>
  • <CSPack>
  • <CSDiff>
  • <CSConcat>
  • <Excel2CSPro>
  • <CSExport>
  • <CSIndex>
  • <CSReFmt>
  • <CSSort>
  • <ParadataConcat>
  • <ParadataViewer>
  • <CSCode>
  • <CSDocument>
  • <CSView>
  • <CSWeb>

Display Dimensions

When working with "maximum display" width and height figures in CSPro, values are returned that may not correspond exactly to the pixels of the display:
Windows: The value returned depends on the current scaling, but the maximum display dimensions returned account for 90% of the display size after accounting for the size of the Windows taskbar.
Android: The unit returned is density-independent pixels: "an abstract unit that is based on the physical density of the screen."
When using display dimensions, you will generally want to use a scaled value for the width and height rather than using fixed values. For example, to view a webpage at 75% of the maximum display size, you could code:
view("https://www.csprousers.org/forum",
     
width := tonumber(getproperty("MaxDisplayWidth")) * 0.75,
     
height := tonumber(getproperty("MaxDisplayHeight")) * 0.75);
See also: UI.getMaxDisplayDimensions Action, GetProperty Function