I am attaching my code because it was very difficult for me to explain without showing you the visuals. The file is Project.py and you can just run on the comman prompt using
user@ubuntu $ python Project.py
I have few questions and I will really appreciate if you can help me fix this little application.
-
If you click on Action Menu and then on Add Computer Details, the new window open at the left top corner. I want it to be in the center of the screen.
-
If you see, my main frame is not utilized except for having menus in them. All the menu clicks open a new window. I want that instead of opening new window for every task, I have the new window in the main frame…how can we accomplish this ?
-
I want to create a splash screen while opening the app and an icon for this small app, how can I do it.
-
If you click on Menu and then click on New config file, it opens a new window. That small window has hardcoded ten choice boxes. I want those choice boxes to be dynamic .i.e whn that windows will open it will read from a file a specific number say 6 and then it will have 6 choice boxes. I am hating that HARDCODED stuff out there.
Please help me, every help is appreciate.
Thanks
Project.py (33.6 KB)
Daniel,
In the future, try to make a tiny sample that has just enough code to illustrate your code, but no more (but is still runnable). The easier you make it to wade through your code, the more likely we will.
1. If you click on Action Menu and then on Add Computer Details, the new
window open at the left top corner. I want it to be in the center of the
screen.
Call Dlg.Center() before ShowModel()
2. If you see, my main frame is not utilized except for having menus in
them. All the menu clicks open a new window. I want that instead of opening
new window for every task, I have the new window in the main frame....how
can we accomplish this ?
Instead of Dialogs, use wx.Panels. Put the Panels on teh Frmae and Show() the one you want, and Hide() the rest.
-Chris
···
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov
I am using wx.Frame and not Dialog. Am I understanding you correctly ?
···
- If you see, my main frame is not utilized except for having menus in
them. All the menu clicks open a new window. I want that instead of opening
new window for every task, I have the new window in the main frame…how
can we accomplish this ?
Instead of Dialogs, use wx.Panels. Put the Panels on teh Frmae and
Show() the one you want, and Hide() the rest.
-Chris
–
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
Daniel Johnson wrote:
I am using wx.Frame and not Dialog. Am I understanding you correctly ?
That's why you want to send a short example!
Anyway, instead of a Frame, use a wx.Panel, with your main Frame as the parent, and show() and hide() them as appropriate. You may need to call Frame.Layout() after switching too.
···
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov