I seem to be running into an issue with the shapeframework using a composite window inside a wxSFControlShape
I have a wxPanel with a sizer containing a wxStaticText and a wxTreeCtrl that I wanted to put in the wxSFControlShape. Adding it works fine, but I stop getting OnKeyDown events on the wxSFShapeCanvas, as well as some mouse event quirkyness. Using any of those controls by itself in the wxSFControlShape has the normal behavior of any other shape.
My guess is that whatever events are being eaten are only happening on the top level wxWindow, and not any children
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Have you tried to use wxSFControlShape::SetEventProcessing function? It allows you to set where GUI control's events will be processed ( by shape canvas and/or by GUI control itself).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I had sfsMOUSE2CANVAS and sfsKEY2CANVAS set up and yeah, it works for top-level controls, but not any nested ones. I looked into SetControl and it seems that looping through all children and setting up the EventSink events fixes the problem.
It is really odd that setting sfsKEY2GUI without also setting sfsKEY2CANVAS on a ControlShape will eat keyboard events for the entire canvas, sfsMOUSE2GUI and sfsMOUSE2CANVAS don't have the same behavior.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I seem to be running into an issue with the shapeframework using a composite window inside a wxSFControlShape
I have a wxPanel with a sizer containing a wxStaticText and a wxTreeCtrl that I wanted to put in the wxSFControlShape. Adding it works fine, but I stop getting OnKeyDown events on the wxSFShapeCanvas, as well as some mouse event quirkyness. Using any of those controls by itself in the wxSFControlShape has the normal behavior of any other shape.
My guess is that whatever events are being eaten are only happening on the top level wxWindow, and not any children
Have you tried to use wxSFControlShape::SetEventProcessing function? It allows you to set where GUI control's events will be processed ( by shape canvas and/or by GUI control itself).
I had sfsMOUSE2CANVAS and sfsKEY2CANVAS set up and yeah, it works for top-level controls, but not any nested ones. I looked into SetControl and it seems that looping through all children and setting up the EventSink events fixes the problem.
It is really odd that setting sfsKEY2GUI without also setting sfsKEY2CANVAS on a ControlShape will eat keyboard events for the entire canvas, sfsMOUSE2GUI and sfsMOUSE2CANVAS don't have the same behavior.