I’ve had a drag-and-drop VSTGUI editor running for a few years now (Windows only, which is why I was curious about a standalone version for both Win/Mac). It currently has one issue that I have not been able to fix involving the CTextEdit control. In my software, when the user hovers the mouse cursor over the control, it will select the control with:
setFocusView(m_pSelectedView);
m_pSelectedView->setWantsFocus(true);
where m_pSelectedView is a CView* (here, the CTextEdit control). This places the red outline around the control as it should.
However, if the CTextEdit control is inside a CViewContainer, the CTextEdit control turns into a solid-filled rectangle with the text color filling the box. The figures here show what I am talking about:
Normal CTextEdit, no parent CViewContiner:
CTextEdit, inside of a CViewContiner with knob and label:
In both shots, the cursor is hovering over the control, or CViewContainer - it is invisible because of the screen capture operation.
Additionally, if the CTextEdit control is inside a CViewContainer that is inside another outer CViewContainer, selecting the outer CViewContainer will also cause the CTextEdit to become a filled rectangle. This is only ever an issue with the CTextEdit object - all other VSTGUI4 objects render as expected, including the related CTextLabel.
I’ve tried re-ordering the lines of code above, as well as omitting the setWantsFocus( ) call with no luck. Is there anything I can do to get rid of this selection anomaly?
Thanks in advance,
Will