User Tools

Site Tools


attribute_property_equates.htm
Navigation:  Language Reference > 9 -  Window and Report Attributes > Attribute Property Equates >====== Attribute Property Equates ====== Previous pageReturn to chapter overviewNext page

Each attribute has a corresponding runtime property listed in its description (PROP:attribute). These attributes are valid in Clarion Win32 Windows, and also for REPORT structures in both Clarion Win32 and Clarion#. Equates for all runtime properties are contained in the PROPERTY.CLW file. This file also contains equates for the standard values used by some of these properties. Some properties are “read-only” and their value may not be changed, and others are “write-only” properties whose value cannot be determined. These restrictions are noted as applicable.

Attribute Property Parameters

Many attributes take no parameter–they are either present or absent. Therefore, their corresponding runtime properties simply toggle the attribute on or off. Assigning an empty string () or zero (0) turns them off. Assigning '1' or 1 turns them on. Typically, the standard equates for TRUE and FALSE are used for this purpose. Querying any of these properties returns a blank string when the attribute is not active for the window, report, or control. Examples of these types of attribute properties are: PROP:ABOVE, PROP:ABSOLUTE, and PROP:ALONE. Example: ?MyControl{PROP:DISABLE} = TRUE         !disables the referenced control Many attributes take a single parameter whose presence specifies both the presence of the attribute and its value. Assigning an empty string () or zero (0) turns them off. Assigning any other valid value turns them on. Examples of these types of attribute properties are PROP:TIMER and PROP:DROP.

Example:

MyWindow{PROP:TIMER} = 100              !set the window's timer to 1 second

Arrayed Properties

A number of attribute properties are actually arrays which either contain multiple values (such as PROP:ALRT, which may contain up to 255 separately alerted keycodes) or which may be referenced as arrays to directly address their multiple parameters instead of using separately declared equates for each of the individual parameters (like PROP:AT, whose parameters may be addressed either as {PROP:AT,n} or as the separately declared equates for each of the individual parameters: PROP:Xpos, PROP:Ypos, PROP:Width, and PROP:Height).

Example:

CheckField STRING(1)

Screen WINDOW

       ENTRY(@N3),USE(Ctl:Code)

       ENTRY(@S30),USE(Ctl:Name),REQ

       CHECK('True or False'),USE(CheckField)

       IMAGE('SomePic.BMP'),USE(?Image)

       BUTTON('OK'),USE(?OkButton),KEY(EnterKey)

       BUTTON('Cancel'),USE(?CanxButton),KEY(EscKey)

      END

CODE

OPEN(Screen)

Screen{PROP:AT,1} = 0                           !Position window to top left corner

Screen{PROP:AT,2} = 0

Screen{PROP:GRAY} = 1                           !Give window 3D look

Screen{PROP:STATUS,1} = -1                      !Create status bar with two sections

Screen{PROP:STATUS,2} = 180

Screen{PROP:STATUS,3} = 0                       !Terminate staus bar array

Screen{PROP:StatusText,2} = FORMAT(TODAY(),@D2) !Put date in status bar section 2:

?CtlCode{PROP:ALRT,1} = F10Key                  !Alert F10 on Ctl:Code entry control

?CtlCode{PROP:Text} = '@N4'                     !Change entry picture token

?Image{PROP:Text} = 'MyPic.BMP'                 !Change image control filename

?OkButton{PROP:DEFAULT} = '1'                   !Put DEFAULT attribute on OK button

?MyButton{PROP:ICON} = 'C:\Windows\MORICONS.DLL[10]'

!Display 11th icon in MORICONS.DLL (zero-based)

?MyButton{PROP:ICON} = 'C:\Windows\MORICONS.DLL[0]'

!Display first icon in MORICONS.DLL (zero-based)

?CheckField{PROP:TrueValue} = 'T'               !Checked/unchecked values for CHECK control

?CheckField{PROP:FalseValue} = 'F'

ACCEPT

END

attribute_property_equates.htm.txt · Last modified: 2021/04/15 15:56 by 127.0.0.1