Category:Properties Events and Methods

From BR Wiki
Jump to navigation Jump to search

See also: Properties, Events, and Methods (PEM) and .NET controls

External controls can now be placed on BR windows:

 PRINT FIELDS "row,col,comp[onent] rows/cols,[,INDEPENDENT]": control-id$,mat properties$ [, mat events$]

INDEPENDENT will signify that the control is independently enabled and is not subject to the normal enabling restrictions associated with FIELDS operations.

control-id$ should be in the format "mycontrol:class-name" mat properties$ will have property assignments (e.g. color=blue) mat events$ will have event assignments to fkey values (TypChanged=1035)

 - to clear pevious settings use TypChanged= -1
 - setting events is optional

The above form cannot be used in the same statement as other controls.

The following forms can be used in the same FIELDS array as other controls:

PRINT FIELDS "row,col,comp[onent] [rows/cols]": mat properties$
INPUT FIELDS "row,col,comp[onent] rows/cols": mat properties$

Input Processing Mat properties$ has property names or property assignments. Any assigned values will be ignored. The array will be populated with property assignments for all specified properties.

The syntax for retrieving all of the names:

INPUT FIELDS "row,col,comp[onent] rows/cols,PROPERTY_NAMES,depth": mat properties$
INPUT FIELDS "row,col,comp[onent] rows/cols,EVENT_NAMES": mat events$
INPUT FIELDS "row,col,comp[onent] rows/cols,METHOD_NAMES": mat methods$

To set or get individual properties:

set$("#fileno,row,col","city=Los Angeles")
set$("#fileno,row,col"," Angeles")

To invoke a method:

INVOKE("#fileno,row,col",method-name$, mat args$)

PEM Data Conversion

BR offers only two data types - string and numeric. Many other types are required by various controls available for outside resources.

Concerning .NET and other objects, BR provides conversion routines for the purpose of working with various data types. For example you may express colors as is done in HTML (#xxyyzz) and have them converted to and from a structure with RGB values for use by a .NET object.

These conversion routines are in a separate DLL that is automatically invoked based on the field's class type when a property value is sent or received by BR via a properties array, or a GET, SET or INVOKE parameter. The DLL used to perform these conversions is included in the object toolbox DLL group located in the BR directory.

The first release of the DLL supports the following object types:

// conversion class for System.Drawing.Color
// conversion class for System.String
// conversion class for System.Int32

If there is a class that you would like to see a conversion routine for that does not exist and you wish to write one, this must implement the interface (DLL data type name) brconvert.BrConversion which has 2 methods:

   int objectToString(System.String string, out System.Object value)
   int stringToObject(System.Object value, out System.String string)

You must also prepend the name of the class with brconvert.BR so if you were going to make a conversion class for System.Drawing.Color the conversion class would need to be named:


PEM File Requirements

The PEM Files are used in Properties, Events, and Methods (PEM) and .NET controls.

BR Directory


Use the following files to install the necessary system programs.

There are two main groups of supporting Dll's needed to use .Net controls with BR:

  1. VC++ shared libraries. These can be tested with vcdlltest.exe and installed with vcredist_x86.exe.
  1. The .Net framework. If you are using Windows 2000, you will need to use dotnetfx20.exe. If you are using windows XP or Vista use dotnetfx35.exe.

Pages in category "Properties Events and Methods"

The following 8 pages are in this category, out of 8 total.