setMouseEnabled(): how to use it?

A user interface toolkit mainly for audio plug-ins (VST, AudioUnit, etc).
Post Reply
Posts: 1
Joined: Wed Jun 22, 2016 7:43 am

setMouseEnabled(): how to use it?

Post by jhox »


I like to set control B (AnimKnob) disabled if control A (OnOffButton) is set to 'On' (value 1.0f).

It works when I click control A.
It doesn't work when
a) the plugin is loaded the first time
b) a preset is loaded
c) switching between generic editor - plugin editor (without changing a pramater value)

Code (VST3.6.6, VSTGUI4.3):
void ViewController::valueChanged(CControl* pControl)
float ctrlValue = pControl->getValue();
switch (pControl->getTag())
case kParamDriveMode:// control A
CControl* ct =getControlByTag(kParamDriveModeCoeff);// control B
if (ct) {
//ct->setVisible((ctrlValue == 1.0f));
ct->setMouseEnabled((ctrlValue == 1.0f));

In debug mode (VS 2015, Win 10) I can see that in any case the values are setting correctly.
But even when I set the background image or call setDirty(), invalid(), valueChanged(): it doesn't work.

setVisible() instead of setMouseEnabled() works - but I don't like to hide the control.

What do I miss?

Thank you.

Post Reply