COMBOBOXADDSTRING

Synopsis
COMBOBOXADDSTRING name item
Description

Appends item to the listbox portion of the combobox that is identified by name.

Example
TO DODRAW
  CLEARSCREEN
  MAKE "sides FIRST COMBOBOXGETTEXT "mycombo
  REPEAT :sides [FORWARD 50 RIGHT 360/:sides]
END

WINDOWCREATE "main "mywindow "mytitle 0 0 100 100 []
COMBOBOXCREATE "mywindow "mycombo 25 0 50 50
COMBOBOXADDSTRING "mycombo [3]
COMBOBOXADDSTRING "mycombo [4]
COMBOBOXADDSTRING "mycombo [5]
COMBOBOXADDSTRING "mycombo [6]
BUTTONCREATE "mywindow "mydraw "Draw 25 50 50 25 [DODRAW]
Select or enter number of sides from combobox and then click the Draw button
WINDOWDELETE "mywindow

SourceForge.net Logo