0% found this document useful (0 votes)
9 views1 page

SetModified Subroutine for Text Controls

The document describes a subroutine named SetModified that manages the 'is-modified' state of a text control in a programming context. It takes three parameters: a handle for the text control, a reference to the previous contents of the control, and a value indicating whether to set the state to modified or not. The programmer is responsible for providing the string associated with the text control's contents.

Uploaded by

olaadeleye184
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views1 page

SetModified Subroutine for Text Controls

The document describes a subroutine named SetModified that manages the 'is-modified' state of a text control in a programming context. It takes three parameters: a handle for the text control, a reference to the previous contents of the control, and a value indicating whether to set the state to modified or not. The programmer is responsible for providing the string associated with the text control's contents.

Uploaded by

olaadeleye184
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

NAME=SetModified

AUTHOR=
ITEM=sub SetModified handle$, byref prevContents$, value
DESCRIPTION=Sub sets the "is-modified" state of a text control to true/false, and
modifies the string used for comparison accordingly. Providing this string in the
main program is the programmer's responsibility.
OUTSIDE CODE=

sub SetModified handle$, byref prevContents$, value


'Arguments:
'handle$ - handle of a text window, textbox or texteditor
'prevContents$ - providing a string for control contents is the
programmer's
'task. Just associate a string for each text control but don't modify it
'outside the function
'value -
'non-zero (1): set to modified
'zero (0): set to not modified
if value = 0 then
#handle$, "!contents? prevContents$"
else
prevContents$ = chr$(0)
end if
end sub

You might also like