From: Chavent Mathieu (
Date: Sun May 12 2013 - 08:50:49 CDT

Thank you very much Christopher! I have checked the treeview widget and it seems doing what I want. The graphic object Id will help me a lot to do my project.

  Best wishes,


----- Mail original -----
De: "Christopher G Mayne" <>
À: "Chavent Mathieu" <>
Cc: "<>" <>
Envoyé: Vendredi 10 Mai 2013 20:39:14
Objet: Re: vmd-l: hide/display VMD graphics primitives

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