[wxPython] laying out a dialog box

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[wxPython] laying out a dialog box

Bob Klimek-2
Hi All,

Does anybody know (or have sample code) how to construct a dialog box
with OK and Cancel buttons already nicely layed out no matter what the
size and shape of the dialog box is?

Currently I construct my dialog boxes by hard coding the positions of
the OK and Cancel buttons but that's slow because no dialog box is the
same.

I've tried generating two panels, each holding some contents which were
positioned by sizers, and then putting them into another panel in a
dialog box but couldn't get it to work right. There's got to be a
simpler way of doing it. Any ideas?

Bob

_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users



Reply | Threaded
Open this post in threaded view
|

RE: [wxPython] laying out a dialog box

Echeverria Rabi, Cristian  Rodrigo, TRANSELEC S.A.
You can use wxBoxSizer.
I send you an example file

Cristian Echeverría

 

-----Original Message-----
From: Bob Klimek [SMTP:[hidden email]]
Sent: Friday, December 17, 1999 12:12 PM
To: wxPython Post
Subject: [wxPython] laying out a dialog box

Hi All,

Does anybody know (or have sample code) how to construct a dialog box
with OK and Cancel buttons already nicely layed out no matter what the
size and shape of the dialog box is?


#- <00> -----------------------------------------------------------------------
# CRISTIAN ECHEVERRÍA RABÍ
# Archivo           : <Nombre> -- <Version> -- <Fecha>
# Descripción       : <Descripción>


from wxPython.wx import *
from wxPython.html import *

#- <00> -----------------------------------------------------------------------

texto = """
<HTML>
<BODY BGCOLOR="#99CCFF">
<CENTER>
<TABLE BGCOLOR="#003399" WIDTH="100%%" CELLSPACING="0" CELLPADDING="0" BORDER="1">
<TR>
    <TD ALIGN="CENTER"><H1><FONT COLOR="#99CCFF">GIA V0.1</FONT></H1></TD>
</TR>
</TABLE>

<P><B>GIA</B> IS UNA APLICACIÓN QUE PERMITE OBTENER INFORMES DE GASTOS DE OBRAS
DESDE LA CONTABILIDAD DE ENDESA Y TRANSELEC.</P>

<P><B>GIA</B> HA SIDO DESARROLLADA POR POR PERSONAL DE LA GERENCIA DE EXPLOTACIÓN.</P>
</CENTER>
<P>
<UL>
        <LI>MANUEL ESCOBAR
        <LI>LUIS HERNÁNDEZ
    <LI>CRISTIAN ECHEVERRÍA
</UL>
</P>
<P><CENTER><FONT SIZE="-1"><I>TRANSELEC 1999</I></FONT></P></CENTER>
</BODY>
</HTML>
"""