[chimerax-users] Use of EnumOption
Eric Pettersen
pett at cgl.ucsf.edu
Wed Nov 25 11:39:24 PST 2020
Hi Daniel,
I have committed documentation for those options, which will show up in the next build. I have also made it possible to use them without subclassing, by providing the 'values' keyword to the EnumOption constructor, or both 'values' and 'labels' to the SymbolcEnumOption constructor.
--Eric
> On Nov 24, 2020, at 6:16 PM, Daniel Esteban Palma Igor <daniel.palma.i at ug.uchile.cl> wrote:
>
> Ok, thank you for the clarification
>
> On Tue, 24 Nov 2020 at 22:56, Eric Pettersen <pett at cgl.ucsf.edu <mailto:pett at cgl.ucsf.edu>> wrote:
> Hi Daniel,
> The documentation is kind of sparse there -- I'll try to remedy that soon. Yes, you would make a subclass. If you subclass EnumOption then you only specify "values" not "labels" -- text shown to the user will be the same as the values. If you subclass SymbolicEnumOption, then you would specify both "values" and "labels", and "labels" is what is shown in the user interface.
>
> --Eric
>
> Eric Pettersen
> UCSF Computer Graphics Lab
>
> > On Nov 24, 2020, at 2:56 PM, Daniel Esteban Palma Igor <daniel.palma.i at ug.uchile.cl <mailto:daniel.palma.i at ug.uchile.cl>> wrote:
> >
> > Hi, when using the chimerax.ui.options.EnumOption, are you supposed to create a subclass that specifies the attributes "labels" and "values"? the documentation doesn't say anything about it.
> > Regards,
> > Daniel Palma Igor
> > _______________________________________________
> > ChimeraX-users mailing list
> > ChimeraX-users at cgl.ucsf.edu <mailto:ChimeraX-users at cgl.ucsf.edu>
> > Manage subscription:
> > https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users <https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users>
>
> _______________________________________________
> ChimeraX-users mailing list
> ChimeraX-users at cgl.ucsf.edu
> Manage subscription:
> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimerax-users/attachments/20201125/ae111a7b/attachment.html>
More information about the ChimeraX-users
mailing list