| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > EditDropListClass > EditDropListClass Methods >====== TakeNewSelection (process EVENT:NewSelection events:EditDropList Class) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[takeevent process edit in place events editdroplist class .htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[editentryclass.htm|{{btn_next_n.gif|Next page}}]] | | || **TakeNewSelection( **//field //**), VIRTUAL** {{blk2blue.jpg|blk2blue.jpg}} | **TakeNewSelection** | Processes the EVENT:NewSelection event. | | //field// | A numeric constant, variable, EQUATE, or expression containing the control number of the control that generated the EVENT:NewSelection event. | The **TakeNewSelection **method processes the EVENT:NewSelection event for the EditDropListClass object. **Implementation:** The TakeEvent method calls the TakeNewSelection method. If the EditDropListClass object's LIST generated the new selection event, then the TakeNewSelection method does the field assignments specified by the AddUpdateField method or clears the target fields if there is no valid selection. **Example:** **EditDropListClass.TakeEvent PROCEDURE(UNSIGNED E)** **  CODE** **  CASE E** **  OF EVENT:Accepted** **     IF SELF.ListIsDown** **        SELF.ListIsDown = False** **        SELF.NewSelected = False** **        IF SELF.AlertedKeyEvent** **           SELF.AlertedKeyEvent = False** **           RETURN EditAction:None** **        ELSE** **           IF KEYCODE()=MouseLeft** **              RETURN EditAction:Forward** **           ELSE** **              RETURN EditAction:None** **           END** **        END** **     ELSE** **       IF SELF.NewSelected** **          SELF.NewSelected = False** **          RETURN EditAction:None** **       ELSE** **          RETURN EditAction:Forward** **       END** **     END** **     RETURN EditAction:Forward** **  OF EVENT:NewSelection** **     SELF.NewSelected = True** **     ****SELF.TakeNewSelection****()** **     RETURN EditAction:None** **  OF EVENT:DroppingDown** **    SELF.ListIsDown = True** **    RETURN PARENT.TakeEvent(E)** **  OF EVENT:PreAlertKey** **    RETURN PARENT.TakeEvent(E)** **  OF EVENT:AlertKey** **    CASE KEYCODE()** **    OF EnterKey** **       RETURN EditAction:Complete** **    OF EscKey** **       RETURN EditAction:Cancel** **    OF TabKey** **    OROF ShiftTab** **         SELF.AlertedKeyEvent = True** **         RETURN PARENT.TakeEvent(E)** **    END** **  END** **  SELF.AlertedKeyEvent = False** **  SELF.ListIsDown = False** **  SELF.NewSelected = False** **  RETURN PARENT.TakeEvent(E)**