-
-
Save gla-chk/c61ec272a556ebec573aa1733fc5a79d to your computer and use it in GitHub Desktop.
Example usage of RTF control read / write to BLOB field
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! Definition of TEXT control | |
! -------------------------- | |
TEXT,AT(6,143,359,201),USE(?RtfMissionDescription),FONT('Arial',12,,,CHARSET:ANSI), | | |
RTF(TEXT:Field),VSCROLL,BOXED,#ORIG(?RTFTextBox),#SEQ(20),#ORDINAL(87) | |
! Embed point Local Objects -> Abc Objects -> Window Manager -> Init | |
! ------------------------------------------------------------------ | |
! | |
! [Priority 8410] | |
! RTF ?RtfMissionDescription Initialize | |
RTFControl20.Init(?RtfMissionDescription) | |
! | |
! [Priority 9001] | |
! ===== Read current mission description from BLOB field ===== | |
! st is a StringTheory object | |
! see https://capesoft.com/docs/StringTheory3/StringTheory.htm#FromBlob | |
st.Start() | |
st.FromBlob(Mission.Description) | |
RTFControl20.SetText(st.GetValuePtr()) | |
st.Free() | |
! Embed point Local Objects -> Abc Objects -> Window Manager -> TakeCompleted | |
! before Parent Call | |
! ------------------------------------------------------------------ | |
! | |
! ===== Save current mission description from BLOB field ===== | |
! st is a StringTheory object | |
! see https://capesoft.com/docs/StringTheory3/StringTheory.htm#ToBlob | |
st.Start() | |
st.SetValue(?RtfMissionDescription{PROP:Text}) | |
st.ToBlob(Mission.Description) | |
st.Free() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment