473,467 Members | 1,990 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

subclass dialog or put in the resource files?


I'm using wxPython and design the gui via wxglade. One of the gui
components is a simple dialog class that gets displayed when a user
exits the program.
I want to use the same dialog but with a different text for closing
certain dialogs in the program. (it's a pure "do you want to exit
<insert screen name>" dialog)

What would i better use, knowing the rest of the gui is in a resource
(xrc) file:

1. Find some way to put a standard exit dialog in the resource file and
then somehow try to set the message to the correct one.

2. Make a simple dialog class that accepts the message to be displayed.
I could even use glade to generate the python code for a start.

What would be the better/cleaner/logical way to do this?

Thanks,
Benedict
Jul 19 '05 #1
1 1638
flupke wrote:

I'm using wxPython and design the gui via wxglade. One of the gui
components is a simple dialog class that gets displayed when a user
exits the program.
I want to use the same dialog but with a different text for closing
certain dialogs in the program. (it's a pure "do you want to exit
<insert screen name>" dialog)

What would i better use, knowing the rest of the gui is in a resource
(xrc) file:

1. Find some way to put a standard exit dialog in the resource file and
then somehow try to set the message to the correct one.

2. Make a simple dialog class that accepts the message to be displayed.
I could even use glade to generate the python code for a start.

What would be the better/cleaner/logical way to do this?

Thanks,
Benedict


I found what i was looking for.
I first load the dialog from the resource files and then i change the
text like this:

children = self.d_exit.GetChildren()
for control in children:
if ( type(control) is wx.StaticText ):
control.SetLabel("<new message>")

Benedict
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: lawrence | last post by:
I'm very unhappy with the error message that I'm giving in this method: /** * 11-23-03 - getter * * We want to run the query against a MySql database and get back a
2
by: Kallis | last post by:
Hello, I have the following situation when trying to localize my software: I have BIG solution with about 80 projects. In one of the projects I have a number of dialogs (the dialog project :-)...
1
by: Jay | last post by:
I am trying to edit a dialog created with msvc 6.0. If I select a control and look in the properties window, there are no properties shown. The drop-down list has 'Selected Object' multiple times...
1
by: M | last post by:
Trying to create a File Preview Dialog. Have created a resource template with GroupBox (ID = stc32). File Open is displayed fine. when I add an activeX control to the dialog, I am getting this error:...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
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...
0
agi2029
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,...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.