please correct my code using boa constructor
------------frame1--------------- - #Boa:Frame:Frame1
-
-
import wx
-
import Frame2
-
import Frame3
-
-
-
def create(parent):
-
return Frame1(parent)
-
-
[wxID_FRAME1, wxID_FRAME1BUTTON1, wxID_FRAME1BUTTON2, wxID_FRAME1PANEL1,
-
] = [wx.NewId() for _init_ctrls in range(4)]
-
-
class Frame1(wx.Frame):
-
def _init_coll_boxSizer1_Items(self, parent):
-
# generated method, don't edit
-
-
parent.AddWindow(self.panel1, 1, border=0, flag=wx.EXPAND)
-
-
def _init_sizers(self):
-
# generated method, don't edit
-
self.boxSizer1 = wx.BoxSizer(orient=wx.VERTICAL)
-
-
self._init_coll_boxSizer1_Items(self.boxSizer1)
-
-
self.SetSizer(self.boxSizer1)
-
-
def _init_ctrls(self, prnt):
-
# generated method, don't edit
-
wx.Frame.__init__(self, id=wxID_FRAME1, name='', parent=prnt,
-
pos=wx.Point(512, 326), size=wx.Size(400, 257),
-
style=wx.DEFAULT_FRAME_STYLE, title='Frame1')
-
self.SetClientSize(wx.Size(392, 223))
-
-
self.panel1 = wx.Panel(id=wxID_FRAME1PANEL1, name='panel1', parent=self,
-
pos=wx.Point(0, 0), size=wx.Size(392, 223),
-
style=wx.TAB_TRAVERSAL)
-
-
self.button1 = wx.Button(id=wxID_FRAME1BUTTON1, label='button1',
-
name='button1', parent=self.panel1, pos=wx.Point(168, 88),
-
size=wx.Size(75, 23), style=0)
-
self.button1.Bind(wx.EVT_BUTTON, self.OnButton1, id=wxID_FRAME1BUTTON1)
-
-
self.button2 = wx.Button(id=wxID_FRAME1BUTTON2, label='button2',
-
name='button2', parent=self.panel1, pos=wx.Point(184, 136),
-
size=wx.Size(75, 23), style=0)
-
self.button2.Bind(wx.EVT_BUTTON, self.OnButton2, id=wxID_FRAME1BUTTON2)
-
-
self._init_sizers()
-
-
def __init__(self, parent):
-
self._init_ctrls(parent)
-
-
def OnButton1(self, event):
-
self.main = Frame2.create(None)
-
self.main.Show()
-
self.Hide()
-
-
def OnButton2(self, event):
-
self.main = Frame3.create(None)
-
self.main.Show()
-
self.Hide()
-----------------frame2-------------- - #Boa:Frame:Frame2
-
-
import wx
-
-
def create(parent):
-
return Frame2(parent)
-
-
[wxID_FRAME2, wxID_FRAME2BUTTON1, wxID_FRAME2PANEL1,
-
] = [wx.NewId() for _init_ctrls in range(3)]
-
-
class Frame2(wx.Frame):
-
def _init_coll_boxSizer1_Items(self, parent):
-
# generated method, don't edit
-
-
parent.AddWindow(self.panel1, 1, border=0, flag=wx.EXPAND)
-
-
def _init_sizers(self):
-
# generated method, don't edit
-
self.boxSizer1 = wx.BoxSizer(orient=wx.VERTICAL)
-
-
self._init_coll_boxSizer1_Items(self.boxSizer1)
-
-
self.SetSizer(self.boxSizer1)
-
-
def _init_ctrls(self, prnt):
-
# generated method, don't edit
-
wx.Frame.__init__(self, id=wxID_FRAME2, name='Frame2', parent=prnt,
-
pos=wx.Point(530, 253), size=wx.Size(400, 257),
-
style=wx.DEFAULT_FRAME_STYLE, title='Frame2')
-
self.SetClientSize(wx.Size(392, 223))
-
-
self.panel1 = wx.Panel(id=wxID_FRAME2PANEL1, name='panel1', parent=self,
-
pos=wx.Point(0, 0), size=wx.Size(392, 223),
-
style=wx.TAB_TRAVERSAL)
-
-
self.button1 = wx.Button(id=wxID_FRAME2BUTTON1, label=u'frame1',
-
name='button1', parent=self.panel1, pos=wx.Point(48, 160),
-
size=wx.Size(75, 23), style=0)
-
self.button1.Bind(wx.EVT_BUTTON, self.OnButton1, id=wxID_FRAME2BUTTON1)
-
-
self._init_sizers()
-
-
def __init__(self, parent):
-
self._init_ctrls(parent)
-
self.parent = parent
-
-
def OnButton1(self, event):
-
self.main = Frame1.create(None)
-
self.main.Show()
-
self.Hide()
--------------frame3-------------- - #Boa:Frame:Frame3
-
-
import wx
-
-
def create(parent):
-
return Frame3(parent)
-
-
[wxID_FRAME3, wxID_FRAME3BUTTON1, wxID_FRAME3PANEL1,
-
] = [wx.NewId() for _init_ctrls in range(3)]
-
-
class Frame3(wx.Frame):
-
def _init_coll_boxSizer1_Items(self, parent):
-
# generated method, don't edit
-
-
parent.AddWindow(self.panel1, 1, border=0, flag=wx.EXPAND)
-
-
def _init_sizers(self):
-
# generated method, don't edit
-
self.boxSizer1 = wx.BoxSizer(orient=wx.VERTICAL)
-
-
self._init_coll_boxSizer1_Items(self.boxSizer1)
-
-
self.SetSizer(self.boxSizer1)
-
-
def _init_ctrls(self, prnt):
-
# generated method, don't edit
-
wx.Frame.__init__(self, id=wxID_FRAME3, name='', parent=prnt,
-
pos=wx.Point(552, 276), size=wx.Size(400, 250),
-
style=wx.DEFAULT_FRAME_STYLE, title='Frame3')
-
self.SetClientSize(wx.Size(392, 216))
-
-
self.panel1 = wx.Panel(id=wxID_FRAME3PANEL1, name='panel1', parent=self,
-
pos=wx.Point(0, 0), size=wx.Size(392, 216),
-
style=wx.TAB_TRAVERSAL)
-
-
self.button1 = wx.Button(id=wxID_FRAME3BUTTON1, label=u'frame1',
-
name='button1', parent=self.panel1, pos=wx.Point(192, 80),
-
size=wx.Size(75, 23), style=0)
-
self.button1.Bind(wx.EVT_BUTTON, self.OnButton1Button,
-
id=wxID_FRAME3BUTTON1)
-
-
self._init_sizers()
-
-
def __init__(self, parent):
-
self._init_ctrls(parent)
-
self.parent = parent
-
-
def OnButton1(self, event):
-
pos = self.GetPosition()
-
self.parent.Move(pos)
-
self.parent.Show()
-
self.Hide()
-----------------app1--------------- - #!/usr/bin/env python
-
#Boa:App:BoaApp
-
-
import wx
-
-
import Frame1
-
import Frame2
-
-
modules ={'Frame1': [0, 'Main frame of Application', u'Frame1.py'],
-
'Frame2': [1, 'second frame of Application', u'Frame2.py'],
-
'Frame3': [2, 'third frame of Application', u'Frame3.py']}
-
-
class BoaApp(wx.App):
-
def OnInit(self):
-
self.main = Frame1.create(None)
-
self.main.Show()
-
self.SetTopWindow(self.main)
-
return True
-
-
def main():
-
application = BoaApp(0)
-
application.MainLoop()
-
-
if __name__ == '__main__':
-
main()
thanks for answer
0 1520 Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Jawahar Rajan |
last post by:
All,
I have an ASP site that uses frames two frames. (yes I
should be using include files, but we started ou using
frames so we have been stuck with frames.)
When I get a page expired warning (I am not caching pages)
and a user clicks refresh from the menu bar the user is
taken back to the home page! The home page is a frame with
a top frame that is repeated on each subsequent asp pages
|
by: Javier |
last post by:
Hello,
I'm very new in this forum and as I have the following problem,
the website is in http://new.vanara.com
----------------------------------------------------------------------------
--------------------------------------------
Here's how the site works:
You should press a button in the rollover area in order to load a source
file on an Iframe, this Iframe is actually hidden working as a Buffer. The
body of this loaded Iframe is...
|
by: Rajagopal |
last post by:
Hi,
I have one main page where i have 3 frames. From main page i will open some
other report page by clicking on a button. Now if i click the Internet
Explorer Back button then it is not showing me the main page which has 3
frames.
Please let me know how i can resolve this.
Thanks,
|
by: PiedmontBiz |
last post by:
Greetings
I have written an online survey with 110 questions. I use javascript to cycle
thru all the questions which are displayed in an iframe.
I keep track of the question number using a "global" variable.
When testing it, everything works fine until I hit the back button. The iframe
goes to the previous question, but of course, the counter is not decremented.
Example if I am at question # 5 and I hit the back button, I go to #4,...
|
by: Miguel Dias Moura |
last post by:
Hello,
I created a datalist in an ASP.Net / VB page.
I display the image and price of a few products.
When a user clicks an image I want to load the page
"detail.aspx?number=id" and send the value of the "id" field of that
record as a URL parameter.
Can someone tell me how to do this.
| |
by: mailto.anand.hariharan |
last post by:
Hello group.
This is my first message in this group, and my first stab at
Javascript.
I am trying to tweak the code for the "FOLDOC button"
(http://foldoc.org/foldoc/tools.html) to be able to execute a DB query
over my firm's intra-net.
The source code for the IE button is as follows:
|
by: Roemer |
last post by:
Hi all
I stumbled over a new problem:
I have a programm with just a class that is asynchronous listening for
network connections. As soon as someone connected, a new form needs to be
created.
The Form gets created but hangs after creation. I'ts logical that that
happens because the new Form doesn't get a Message Loop.
The Message Loop is created on Application.Run() on the Main Method on the
Main Thread. The Callback is (normally)...
|
by: Richard Maher |
last post by:
Hi,
I am in a mouseup event for button A and I'd like to disable=false button B
before starting some work. Is there anyway that an event for button B can
then fire before my event processing for button A's mouseup has completed?
I beleive event processing to be single-threaded for good reason but I need
a "stop" button and it's no good if it doesn't do anything until the other
processing has finished :-)
|
by: Beamer |
last post by:
Hi I am trying to build a roating slide effect in javascript.
Basically, I have a list like below
<ul id="slideShowCnt">
<li id="slide0"><img .../></li>
<li id="slide0"><img .../></li>
<li id="slide0"><img .../></li>
<li id="slide0"><img .../></li>
<li id="slide0"><img .../></li>
<li id="slide0"><img .../></li>
|
by: mcl |
last post by:
I have a domain name which is set up for web forwarding with a frame.
I have a link on one of the site's pages to an external site.
When I select the link the external site is displayed correctly with
its own URL in the address bar.
When I select the <backbutton in the browser, my domain name appears
temporarily in the browser, but it returns to the external site.
If I look at back History (In Firefox) there are two entries for my...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |