472,333 Members | 2,496 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,333 software developers and data experts.

Embedding a close button in a WxNoteBook

Hi there,

Gotta problem n embedding a close button in the notebook

Lemme know if there are any specific method of doing it!!

To be specific, i need it look like the close tab in mozille r fire fox browsers
Sep 1 '06 #1
1 3289
6,596 Expert 4TB
Try this:

#!/usr/bin/env python
# -*- coding: ISO-8859-1 -*-
# generated by wxGlade 0.4 on Tue Sep 12 14:43:34 2006

import wx

class MyFrame(wx.Frame):
def __init__(self, *args, **kwds):
# begin wxGlade: MyFrame.__init__
kwds["style"] = wx.DEFAULT_FRAME_STYLE
wx.Frame.__init__(self, *args, **kwds)
self.notebook_1 = wx.Notebook(self, -1, style=0)
self.notebook_1_pane_1 = wx.Panel(self.notebook_1, -1)
self.button_1 = wx.Button(self.notebook_1_pane_1, -1, "button_1")


self.Bind(wx.EVT_BUTTON, self.OnCloseButton, self.button_1)
# end wxGlade

def __set_properties(self):
# begin wxGlade: MyFrame.__set_properties
# end wxGlade

def __do_layout(self):
# begin wxGlade: MyFrame.__do_layout
sizer_1 = wx.BoxSizer(wx.VERTICAL)
sizer_2 = wx.BoxSizer(wx.HORIZONTAL)
sizer_2.Add(self.button_1, 0, wx.ADJUST_MINSIZE, 0)
self.notebook_1.AddPage(self.notebook_1_pane_1, "tab1")
sizer_1.Add(self.notebook_1, 1, wx.EXPAND, 0)
# end wxGlade

def OnCloseButton(self, event): # wxGlade: MyFrame.<event_handler>
print "Event handler `OnCloseButton' not implemented!"

# end of class MyFrame

class MyApp(wx.App):
def OnInit(self):
frame_1 = MyFrame(None, -1, "")
return 1

# end of class MyApp

if __name__ == "__main__":
app = MyApp(0)
Sep 12 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Gandalf | last post by:
How can I hide/show a page (wxNotebookPage) invisible of a wx.wxNotebook instance? There is a GetPage() method which returns a wxNotebookPage but I...
by: klaus.roedel | last post by:
Hi, I've implemented a wxnotebook on my application. I can set a tooltip for the complete notebook, but I want to set for every page a tooltip, so...
by: mardif | last post by:
Hi ! this is my problem: I've a wxNotebook object, which contains 2 Panels. On up, there is TAB section, I have 2 tabs. I want to color the...
by: Budhi Saputra Prasetya | last post by:
Hi, I still have the same problem with embedding Windows Control. I'll just requote what I posted last time: I managed to create a Windows...
by: Soren | last post by:
Hi, I've been trying to embed matplotlib in wxpython. I want to be able to put a figure (axes) in a wx.Panel and place it somewhere in my GUI....
by: Anil Gupte | last post by:
How do I embed Windows Media Player so I can control it with VB code. I am familiar with embedding in a web page like this: ***************...
by: devnew | last post by:
i am trying out tkinter to make a gui..i want to have a frame with an embedded file explorer next to a 'open directory' label..i tried out...
by: Ken Fine | last post by:
I'm making an administrative interface that lists records in a GridView. For *each* row in the gridview, I would there to be two interface...
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.