// - Whenever a Combo Box control is modified
// Call the UpperMask procedure
UpperMask()
// --UpperMask procedure
// Capitalize the 1st letter for an editable Combo Box control
PROCEDURE UpperMask()
Value = MySelf
IF Length(Value) > 1 THEN
CursorPosition = MySelf..Cursor
MySelf = Upper(Value[[1]]) + ...
Lower(Value[[2 TO Length(Value)]])
MySelf..Cursor = CursorPosition
END
Remarks
Handling the current control
- MySelf is always replaced by the current control. For example:
- Retrieving the value of the current control:
Modifying the value of the current control:
- Using a property (..Caption for example):
MySelf..Caption = "Name of customers"
ControlCaption = MySelf..Caption
- Passing a parameter:
- A WLanguage error occurs if there is no current control.
Using MySelf in a procedure
- MySelf can be used in a local procedure or in a global procedure only if the procedure is called in a process associated with a control. In this case, MySelf refers to the current control.
- MySelf is used to make a procedure "generic": the name of the control is not spelled out. This procedure can be called by several controls.
WLanguage functions and current control
To specify the current control in the WLanguage functions that accept a control name in parameter, use:
- an empty string,
- Myself directly.