How to add caption bar to a Panel?

Hi,

I want to have a panel with caption bar. Is there a way of achieving
this? I tried using an MDIChildFrame but the caption bar is as big as
the parent frame but I don't want this.

Thanks.

Al,

Subclass wx.Panel and do the following in the __init__():

   sizer = wx.BoxSizer(wx.VERTICAL)
   titlePanel = wx.Panel(self, -1)
   stext = wx.StaticText(titlePanel, -1, "Panel Caption")
   sizer.Add(titlePanel, 0, wx.EXPAND|wx.ALL, 0)
# Add other widgets you want the panel to contain after this, eg. tree
or text control
   self.SetSizer(sizer)
   self.SetAutoLayout(1)
   sizer.SetSizeHints(self)

If you need more help, please let me know.

Thanks,
-Kartic

···

On 10/4/05, Al <alpot@mylinuxsite.com> wrote:

Hi,

I want to have a panel with caption bar. Is there a way of achieving
this? I tried using an MDIChildFrame but the caption bar is as big as
the parent frame but I don't want this.

Thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Yes, I am talking about the title bar. I understand that a panel doesn't
have one but if I use an MDIChildFrame instead to get the same effect
its title bar is too big for me. I want a title bar of the size similar
to wxMiniFrame.

···

On Thu, 2005-10-06 at 19:53, Chris Mellon wrote:

What part of the theme are you talking about? If you mean a title
bar. then you have to use a wxFrame - by definition a panel does not
have one. If you want something thats not a title bar but uses the
same theme colors as one you'll have to draw it yourself. Theres a
number of functions you can use to help find the right theme options,
look at wx.SystemSettings