Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #16048
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!newsfeed.kamp.net!newsfeed.kamp.net!feeder3.cambriumusenet.nl!feed.tweaknews.nl!193.201.147.92.MISMATCH!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <illy@otekno.biz> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.030 |
| X-Spam-Evidence | '*H*': 0.94; '*S*': 0.00; 'python': 0.08; 'advance.': 0.09; '(self,': 0.09; '__name__': 0.09; 'pos': 0.09; 'problem:': 0.09; 'def': 0.13; "'__main__':": 0.16; 'false)': 0.16; 'true)': 0.16; 'skip:m 30': 0.24; '"this': 0.24; 'function': 0.27; 'import': 0.27; 'class': 0.29; '-1,': 0.30; 'none,': 0.30; 'app': 0.31; 'skip:( 20': 0.31; "can't": 0.32; 'header:User-Agent:1': 0.33; 'to:addr:python-list': 0.34; 'skip:# 10': 0.34; 'thank': 0.35; 'skip:" 10': 0.37; 'skip:_ 10': 0.37; 'created': 0.38; 'put': 0.38; 'subject:from': 0.38; 'files': 0.39; 'to:addr:python.org': 0.40; 'skip:w 30': 0.63; 'dear': 0.64; 'received:202': 0.66; 'show': 0.67; 'received:info': 0.77; 'received:120': 0.91; 'subject:skip:S 10': 0.91 |
| Date | Tue, 22 Nov 2011 02:21:16 +0700 |
| From | Illy <illy@otekno.biz> |
| Organization | OpenTEK (PT.OpenTEKnologie internasional) |
| User-Agent | Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20111003 Thunderbird/7.0.1 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | SetStatusText of MDIParentFrame from MDIChildFrame |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-AntiAbuse | This header was added to track abuse, please include it with any abuse report |
| X-AntiAbuse | Primary Hostname - cinty.opentek.info |
| X-AntiAbuse | Original Domain - python.org |
| X-AntiAbuse | Originator/Caller UID/GID - [47 12] / [47 12] |
| X-AntiAbuse | Sender Address Domain - otekno.biz |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2932.1321905761.27778.python-list@python.org> (permalink) |
| Lines | 94 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1321905761 news.xs4all.nl 6990 [2001:888:2000:d::a6]:37399 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:16048 |
Show key headers only | View raw
Dear my friends....
I am stucked on a problem: I can't call a function of MDIParentFrame
from MDIChildFrame: myturnonmenu and mystatusbar.SetStatusText()
Anybody would be so nice for telling me my mistakes? Please do me a favor.
Thank you very much in advance.
I created 3 files contain this sourcecode:
ceo@mefi:~/sementara/tes$ ls
jendelapos.py jendelapos.pyc myMDIChildFrameforLogin.py
myMDIChildFrameforLogin.pyc myMDIFrame.py
ceo@mefi:~/sementara/tes$
===========================================
ceo@mefi:~/sementara/tes$ cat myMDIFrame.py
#!/usr/bin/env python
import wx
import os
import jendelapos
import myMDIChildFrameforLogin
class myMDIParentFrame (wx.MDIParentFrame):
def __init__(self):
global mystatusbar, menuakuntan
wx.MDIParentFrame.__init__(self, None, -1, "This is
myMDIParentFrame", size=(1020,800))
mystatusbar = self.CreateStatusBar()
mystatusbar.SetStatusText("This is the StatusBar I want to put
my message for the users in it")
menuakuntan = wx.Menu()
menuakuntan.Append(1000, "Accounting - POS (&Point of Sale)")
menuaplikasi = wx.Menu()
menuaplikasi.Append(20000, "&Login")
menuaplikasi.Append(20001, "E&xit")
menubar = wx.MenuBar()
menubar.Append(menuakuntan, "&Accounting")
menubar.Append(menuaplikasi, "A&pplication")
myturnoffmenu(self)
self.SetMenuBar(menubar)
self.Bind (wx.EVT_MENU, self.jendelapos, id=1000)
self.Bind (wx.EVT_MENU, self.myMDIChildFrameforLogin, id=20000)
self.Bind (wx.EVT_MENU, self.OnExit, id=20001)
def OnExit(self, evt):
self.Close(True)
jendelapos = jendelapos.Show
myMDIChildFrameforLogin = myMDIChildFrameforLogin.Show
def myturnoffmenu(self):
menuakuntan.Enable(1000, False)
def myturnonmenu(self):
menuakuntan.Enable(1000, True)
if __name__ == '__main__':
app = wx.PySimpleApp()
myMDIFrame = myMDIParentFrame()
myMDIFrame.Show()
app.MainLoop()
ceo@mefi:~/sementara/tes$
=================================================
ceo@mefi:~/sementara/tes$ cat ./myMDIChildFrameforLogin.py
import wx
def Show(self, evt):
global pengguna, katakunci, jendela
jendela = wx.MDIChildFrame(self, -1, "Login Form", style=
wx.DEFAULT_FRAME_STYLE | wx.HSCROLL | wx.VSCROLL)
mystatusbar.SetStatusText("Login succeeded")
myturnonmenu()
jendela.Show(True)
ceo@mefi:~/sementara/tes$
=================================================
ceo@mefi:~/sementara/tes$ cat jendelapos.py
import wx
def Show (self, evt):
win = wx.MDIChildFrame(self, -1, "Accounting - POS")
win.Show(True)
ceo@mefi:~/sementara/tes$
=================================================
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
SetStatusText of MDIParentFrame from MDIChildFrame Illy <illy@otekno.biz> - 2011-11-22 02:21 +0700
csiph-web