DECLARE SUB Remove
CONST CRLF = CHR$(13) + CHR$(10)
CREATE Form AS QFORM
CREATE ListBox AS QLISTBOX
Align = 1
AddItems "apple", "orange", "lemon"
END CREATE
CREATE Button AS QBUTTON
Align = 2
CAPTION = "Remove 'orange'"
OnClick = Remove
END CREATE
Center
SHOWMODAL
END CREATE
SUB Remove
ListBox.Text = REPLACESUBSTR$(ListBox.Text, _
CRLF + "orange" + CRLF, CRLF)
END SUB
|