From: Mayne, Christopher G (cmayne2_at_illinois.edu)
Date: Fri May 10 2013 - 14:39:14 CDT

You will need to keep track of molid and graphic object id values in order to manipulate the objects when needed. There are, of course, a number of ways to do this. I would suggest looking into using a ttk Treeview widget, as it will provide you with clickable entries in a box AND allow you to store information associated with those entries without having to manage a whole bunch of lists external to the widget. The learning curve for the treeview widget is a little steep, but they are quite powerful and intuitive to use once you get the hang of it.

Christopher Mayne

On May 10, 2013, at 12:09 PM, Chavent Mathieu wrote:

> Hi All,
>
> I am developing a little VMD plugin. In this plugin I would like to display/hide several graphical primitives such as cylinders, boxes, spheres, etc .. to do this I am using the command line graphics 'Molid' sphere/cylinder/lines etc... I would like to associate these graphical primitives to a simple listbox that I have created in a tk window so that when I am clicking on an element on this listbox I can hide/display the good graphical primitive. To summary, I would like to do exactly like the nice list in the Graphics->Representations window but with the graphical primitives that I have created.
>
> Is there a simple way to do this ?
>
> Thank you in advance!
>
> Matthieu Chavent