Comm.openTCPIP(1, "192.168.1.10",9750) DIM sc as SegmentedControl, scTextField AS TextField sc = Graphics.newSegmentedControl(125, 200, 500, 500) sc.insertSegment("FORWARD", 1, 1) sc.insertSegment("REVERSE", 2, 0) sc.insertSegment(" STOP ", 2, 0) sc.setSelected(1) sc.setApportionByContent(1) scTextField = Graphics.newTextField(350, 180, 60, 20) scTextField.setText("STOP") DIM quit AS Button quit = Graphics.newButton(10,10) quit.setTitle("Quit") quit.setBackgroundColor(1, 1, 1) quit.setGradientColor(0.8, 0.8, 0.8) quit.setColor(0.5, 0.5, 0.5) quit.setFont("Helvetica", 18, 1) System.showGraphics SUB touchUpInside (ctrl AS Button, when AS DOUBLE) IF ctrl = quit THEN STOP END IF END SUB SUB valueChanged (ctrl AS Control, when AS DOUBLE) IF ctrl = sc THEN print #1 ,sc.selected scTextField.setText(sc.title(sc.selected)) END IF END SUB