Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 261569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:26:34+00:00 2026-05-11T22:26:34+00:00

I have a wx.Frame, in which there is a main wx.Panel with several widgets

  • 0

I have a wx.Frame, in which there is a main wx.Panel with several widgets inside of it. I want one button in there to cause a “help panel” to come up. This help panel would probably be a wx.Panel, and I want it to overlay the entire main wx.Panel (not including the menu bar of the wx.Frame). There should be some sort of close button on the help button that will make it disappear again.

What is a good way to achieve this? I’ve looked into wx.Notebook but haven’t found a way to make it not show the tabs.

Note that I don’t want to destroy and recreate the help panel every time the user closes and opens it: I just want it to be hidden.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T22:26:35+00:00Added an answer on May 11, 2026 at 10:26 pm

    There are several ways

    a) you can create a custom child panel, and make it same size and position at 0,0 among top of all child widgets. no need of destroying it just Show/Hide it
    this also resizes with parent frame

    b) popup a wx.PopupWindow or derived class and place and size it at correct location

    so as suggest in a) here is an example, where all controls are put in panel using sizer, as separate help cntrl is created which can be shown/hidden from button, but you can create a custom cntrl which hides itself on clicking close

    import wx
    
    class MyFrame(wx.Frame):
        def __init__(self):
            wx.Frame.__init__(self, None)
    
            self.panel = wx.Panel(self)
    
            # create controls
            self.cntrlPanel = wx.Panel(self.panel)
            stc1 = wx.StaticText(self.cntrlPanel, label="wow it works")
            stc2 = wx.StaticText(self.cntrlPanel, label="yes it works")
            btn = wx.Button(self.cntrlPanel, label="help?")
            btn.Bind(wx.EVT_BUTTON, self._onShowHelp)
    
            sizer = wx.BoxSizer(wx.VERTICAL)
            sizer.Add(stc1)
            sizer.Add(stc2)
            sizer.Add(btn)
            self.cntrlPanel.SetSizer(sizer)
    
    
            # create help panel
            self.helpPanel = wx.Panel(self.panel)
            self.stcHelp = wx.StaticText(self.helpPanel, label="help help help\n"*8)
            btn = wx.Button(self.helpPanel, label="close[x]")
            btn.Bind(wx.EVT_BUTTON, self._onShowCntrls)
            sizer = wx.BoxSizer(wx.VERTICAL)
            sizer.Add(self.stcHelp)
            sizer.Add(btn)
            self.helpPanel.SetSizer(sizer)
            self.helpPanel.Hide()
            self.helpPanel.Raise()
            self.helpPanel.SetBackgroundColour((240,250,240))
            self.Bind(wx.EVT_SIZE, self._onSize)
    
            self._onShowCntrls(None)
    
        def _onShowHelp(self, event):
            self.helpPanel.SetPosition((0,0))
            self.helpPanel.Show()
            self.cntrlPanel.Hide()
    
        def _onShowCntrls(self, event):
            self.cntrlPanel.SetPosition((0,0))
            self.helpPanel.Hide()
            self.cntrlPanel.Show()
    
        def _onSize(self, event):
            event.Skip()
            self.helpPanel.SetSize(self.GetClientSizeTuple())
            self.cntrlPanel.SetSize(self.GetClientSizeTuple())
    
    app = wx.PySimpleApp()
    frame = MyFrame()
    frame.Show()
    app.SetTopWindow(frame)
    app.MainLoop()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one frame in which one TestArea is there. When I append some
I have a custom UITableViewCell which contains several UIButtons. Each button's frame position is
I have a window(say main window) with a frame which has a page in
I have an XBAP WPF application which displays various pages inside of a Frame.
We have some web pages which have two frames, with one frame in the
I have a frameset on my server which hosts a top frame main menu
I have three JPanels inside a main Frame. Clockwise from the left, in the
I want to cause the main thread (the thread started which runs main() )
I have a data.frame (which I melted using the melt function), from which I
Let's assume that we have a data frame x which contains the columns job

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.