gmslControlDataClass
The Control Service Class
Section titled “The Control Service Class”The service class ControlData accesses control Data
The method FindProperty
Section titled “The method FindProperty”Interface: Integer FindProperty(int ctlType, string propName, int iCode);
<Method id="FindProperty" type="Integer" opcode="SCM.ControlData_FindProperty" > <Argument id="ctlType" type="Integer" status="ByVal" /> <Argument id="propName" type="String" status="ByVal" /> <Argument id="iCode" type="Integer" status="ByVal" /></Method>The method FindProperty locates the assignment value for a propertyspecified via its operation code in the parameter ctlType and its operation subcode inthe parameter propType. If that value is present its code starting offset is returned;else zero is returned.
The method GetFontSize
Section titled “The method GetFontSize”Interface: string GetFontSize(int iCode, int inXml);
<Method id="GetFontSize" type="String" opcode="SCM.ControlData_GetFontSize" > <Argument id="iCode" type="Integer" status="ByVal" /> <Argument id="inXml" type="Integer" status="ByVal" Optional="1" /></Method>The method GetFontSize returns the authored value of a Font Size propertywhose value whose code starting offset is in the parameter iCode. The string result isreturned in the parameter valueInfo. The method returns the length of the result. Notethat regarding Font Size, the font units in VB6 and WinForms is Points In XML all sizes arein logical Pixels. We typically can use 72 points/inch and 96 pixels/inch for scaling.
The method GetProperty
Section titled “The method GetProperty”Interface: string GetProperty(int iCode, int inXml);
<Method id="GetProperty" type="String" opcode="SCM.ControlData_GetProperty" > <Argument id="iCode" type="Integer" status="ByVal" /> <Argument id="inXml" type="Integer" status="ByVal" Optional="1" /></Method>The method GetProperty returns the authored value of a property whose valuecode starting offset is in the parameter iCode. The string result is returned in theparameter valueInfo. The method returns the length of the result.
The method GetValue
Section titled “The method GetValue”Interface: int GetValue(int iCode);
<Method id="GetValue" type="Integer" opcode="SCM.ControlData_GetValue" > <Argument id="iCode" type="Integer" status="ByVal" /></Method>The method GetValue returns the integer value of a property whose valuecode starting offset is in the parameter iCode.
The method LoadCode
Section titled “The method LoadCode”Interface: int LoadCode(int ctlRoot, int cmpOnly);
<Method id="LoadCode" type="Integer" opcode="SCM.ControlData_LoadCode" > <Argument id="ctlRoot" type="Integer" status="ByVal" /> <Argument id="cmpOnly" type="Integer" status="ByVal" optional="0" /></Method>The method ControlData_LoadCode loads the property code vector into the next availablebyte of code storage and returns the offset of that starting byte. The parameter ctlRootis the root offset of the control whose data is to be accessed. If the control has no codevector associated with it, then a zero is returned. Note that when the code vector is nolonger needed the user must call the method Opcode.SetLength(iCode), where iCodewas the return value of this method. The parameter cmpOnly, if nonzero, specifies thatthe original compiled code only should be used, not the modified analysed code.
The method ReplaceValue
Section titled “The method ReplaceValue”Interface: int ReplaceValue(int icode, int opcode, int subcode);
<Method id="ReplaceValue" type="Integer" opcode="SCM.ControlData_ReplaceValue" > <Argument id="icode" type="Integer" status="ByVal" /> <Argument id="opcode" type="Integer" status="ByVal" /> <Argument id="subcode" type="Integer" status="ByVal" /></Method>The method ControlData_ReplaceValue replaces the value of a property whose valuecode starting offset is in the parameter iCode.
The method SaveCode
Section titled “The method SaveCode”Interface: void SaveCode(int ctlRoot, int iStart);
<Method id="SaveCode" type="Void" opcode="SCM.ControlData_SaveCode" > <Argument id="ctlRoot" type="Integer" status="ByVal" /> <Argument id="iStart" type="Integer" status="ByVal" /></Method>****