Value Modify Form - Displays an input box allowing the user to change a string value.
STRING FUNCTION _ValueModifyForm(STRING sCurrentValue,
STRING sDescription)
INT nPixelsPerColumn = 6;
INT nPixelsPerRow =
18;
INT nXPos = 0;
INT nYPos = 0;
// Calculate the
offset of the form to the page
nXPos
= (StrToInt(PageInfo(12)) - 55 * nPixelsPerColumn)/ 2;
nYPos
= (StrToInt(PageInfo(13)) - 6 * nPixelsPerRow) / 2;
// Adjust form
position in case the parent page was moved out of the default posistion (0,0)
nXPos
= nXPos + StrToInt(PageInfo(14));
nYPos
= nYPos + StrToInt(PageInfo(15));
hValueModifyForm
= FormNew("@(Enter a new value:)", 55, 6, 149 + 256);
FormPosition(nXPos,
nYPos, 0);
FormPrompt(2, 0, sDescription);
hValueEditField
= FormEdit(2, 2, sCurrentValue, 52);
FormButton(2, 4, " @(Clear)
", ClearValue, 0);
FormButton(23, 4, " @(OK)
", 0, 1);
FormButton(38, 4, " @(Cancel)
", 0, 2);
FormRead(0);
RETURN sCurrentValue;
END
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.