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 7799411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T00:18:02+00:00 2026-06-02T00:18:02+00:00

In the following sample program I can’t seem to get the notebook control to

  • 0

In the following sample program I can’t seem to get the notebook control to use the styles I tell it to use. Despite the FNB_HIDE_ON_SINGLE_TAB, FNB_NO_NAV_BUTTONS and FNB_X_ON_TABS styles I still see the navigation buttons and a single tab with no close button. It’s the same for all styles I’ve tried, they’re all completely ignored.

I’m running this on Ubuntu 11.10, python 2.7.2 and wxPython 2.8.11 if it matters

import wx
import wx.lib.flatnotebook as FNB

class TabCtrl(FNB.FlatNotebook):
    def __init__(self, parent):
        windowstyle = FNB.FNB_HIDE_ON_SINGLE_TAB|FNB.FNB_NO_NAV_BUTTONS|FNB.FNB_X_ON_TAB
        super(TabCtrl, self).__init__(parent, style=windowstyle)

        self.pages = []

        self.pages.append(wx.Panel(self))
        self.AddPage(self.pages[0], 'Test')

class MainFrame(wx.Frame):
    def __init__(self, *args, **kwargs):
        super(MainFrame, self).__init__(*args, **kwargs)

        self.panel = wx.Panel(self)
        self.tabs = TabCtrl(self.panel)

        sizer = wx.GridBagSizer(vgap=8, hgap=8)
        sizer.Add(self.tabs, (0, 0), (10, 30), wx.EXPAND)
        sizer.AddGrowableCol(29)
        sizer.AddGrowableRow(9)

        self.panel.SetSizer(sizer)

        self.panel.Fit()
        self.SetInitialSize()

class App(wx.App):
    def __init__(self, *args, **kwargs):
        super(App, self).__init__(*args, **kwargs)

        self.frame = MainFrame(None, title='Test')
        self.frame.Show()

app = App()
app.MainLoop()
  • 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-06-02T00:18:04+00:00Added an answer on June 2, 2026 at 12:18 am

    FNB_NO_NAV_BUTTONS and FNB_X_ON_TABS both work on my machine (using the wxPython demo) using wxPython 2.8.12, Windows 7, Python 2.6. When it comes to anything in the AGW widget set, I highly recommend downloading the latest version from SVN. I know the author of that library and he’s always updating it and fixing bugs, so updating to the latest in SVN is usually worth it.

    EDIT: I was looking at this again and I think you’re putting at least some of those flags in on the wrong parameter. There’s an “agwStyle” argument in FlatNotebook too and I’m thinking that’s where some or all of those FlatNotebook-related flags should be applied to:

    super(TabCtrl, self).__init__(parent, agwStyle=windowstyle)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to write a sample program that can call use the main
I am getting the following error while compiling a sample program in Qt 4.5
In Visual C++ i wrote the following sample in a C++ program: float f1
I am trying to get a sample program working with JUNG , a graphing
Following is the output of objdump of a sample program, 080483b4 <display>: 80483b4: 55
How can I write a program that will automatically generate a sample examination? For
I have the following sample code: program boohoo; {$APPTYPE CONSOLE} {$IFDEF boo} {$MESSAGE warn
I was going through some shell script tutorials and found the following sample program:
Given the following simple program: import wx class TestDraw(wx.Panel): def __init__(self,parent=None,id=-1): wx.Panel.__init__(self,parent,id,style=wx.TAB_TRAVERSAL) self.SetBackgroundColour(#FFFFFF) self.Bind(wx.EVT_PAINT,self.onPaint)
Based on the following simple program the bitwise left shift operator works only for

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.