RobotStudio event

Creating a drop down list

I have been trying to create an event handler for a button on the flex pendant which should then show a list of items if clicked, but to no avail :(. Can someone help me out?
Thanks