Menu

#1 Using a wxPanel as the parent (broken)

CVS
open
Mapper4 (1)
5
2002-09-17
2002-09-17
No

I have to put a wxPanel between the MapperFrame and the
widgets to be able to catch keypresses. I've been told
it is also required on win32, else there is no window
background.

Old hierarchy: (bound parent - sizer - {sizer contents})
MapperFrame - gsizer - {bar panel, canvas}
bar panel and canvas are children of MapperFrame

New hierarchy:
MapperWin - gsizer - {bar panel, canvas}
with MapperWin a wxPanel subclass, only child of the
MapperFrame. bar panel and canvas are children of
MapperWin.

Note that the bar panel is a wxPanel containing more
widgets, bound to bsizer, which keeps up the aspect of
the bar panel children.

Important files:
main.(cpp|h) - the App and the Frame
win.(cpp|h) - the Panel parent, and the widgets setup.

Patching instructions:
cd mapper4; patch -p0 < path/to/panel.patch

Discussion

  • Thomas Equeter

    Thomas Equeter - 2002-09-17

    The patch itself.

     
  • Thomas Equeter

    Thomas Equeter - 2002-09-17
    • labels: --> Mapper4
    • milestone: --> CVS
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.