smartdashboard widget sendable chooser

I’m making a custom smartdashboard widget and wanted to use the sendable chooser class. So far it seems like that code is only available in the robot library. Is there any way I can use that class or something similar in a widget.

The code for the sendable chooser widget is in the SmartDashboard source, in the Chooser class.

I’m having trouble finding information on how to use this chooser. Is there a javadoc somewhere?

Check out this web page. It has an example of using a SendableChooser for selecting one of many Autonomous programs. Of course you can use it for any purpose in the same way.

http://wpilib.screenstepslive.com/s/3120/m/7932/l/81109-choosing-an-autonomous-program-from-smartdashboard

Brad