Page 1 of 1

Subclassed Control

Posted: Fri Apr 29, 2022 2:51 pm
by UrbanCyborg
Just how do you insert a control you've subclassed, given that the subclass won't appear in VMD's Controls pane? Say, for instance, you've written a class that extends Knob, or Toggle Button. How, exactly, do you insert such a control in the Design pane?

Re: Subclassed Control

Posted: Sat Apr 30, 2022 5:55 pm
by ColinP
It would be fantastic if VMD was extensible in the way you are describing. It would make life a lot easier but I'm not holding my breath.

As things stand AFAIK the only way to go is to DIY programmatically or to use an existing component as a placeholder and then call something like a register method to store a reference to the placeholder in your custom object. You can then automatically call SetVisible( false ) on the placeholder if required. At least this way you can manipulate the x, y, w, h interactively.

Re: Subclassed Control

Posted: Sat Apr 30, 2022 6:09 pm
by UrbanCyborg
Ouch.

Re: Subclassed Control

Posted: Sat Apr 30, 2022 6:19 pm
by ColinP
Yeah.

I mean I could be wrong but I don't think so.