
sascombo in
your FRAME entry, and you want to set the list style to simple (represented
by the integer 1): call notify ('sascombo', '_set_property_',
'Style', 1);length text $ 200;
call notify ('sascombo', '_get_property_',
'Text', text);call notify('sascombo', '_DO_', 'Clear');length item $ 80;
call notify('sascombo', '_COMPUTE_',
'GetItem', 2, item);When
this call returns, item contains the text of the item at position
2 (the third item in the list).
N; a character value is indicated with a C.
/* Label specified in Event Map dialog box */
KEYPRESS:
/* Define a method with an
integer argument */
method keyval 8;
/* Convert the integer to an
ASCII character */
keychar=byte(keyval);
put keychar=; /* Output the character */
endmethod;length event $ 80;
/* All OLE control events are mapped to
this label */
RUNLABEL:
/* Call the object's label */
call send(_self_, '_OBJECT_LABEL_');
return;
/* This is the label of the OLE control */
OBJ1:
/* Determine the last event */
call notify('obj1', '_GET_EVENT_', event);
select (event);
when('Click') put 'Click received';
when('DblClick') put 'DblClick received';
otherwise put event=;
end;
return;/* Add a new item to a ComboBox list. */
ADDITEM:
method text $200 row 8 rc 8;
/* adjust for zero-based index */
ocxrow = row-1;
call send(_self_, '_COMPUTE_', 'AddItem',
text, ocxrow, rc);
if ( rc = 0 ) then
_MSG_="ERROR: Could not add item to list.";
endmethod; /* Adds 'Item 1' at the first position */
/* in the control */
length success 8;
call notify('sascombo', 'ADD_ITEM',
'Item 1', 1, success);FINDITEM:
method text $200 row 8;
call send(_self_, '_COMPUTE_', 'FindItem',
text, row);
row = row + 1; /* adjust for zero-based */
endmethod; /* index */length position 8;
call notify('sascombo','FIND_ITEM',
'Lost Item', position);GETTEXT:
method text $200;
call send(_self_, '_GET_PROPERTY_',
'Text', text);
endmethod;length text $ 200;
call notify('sasedit', '_GET_TEXT_', text);