text alignment

Mike Driscoll kyosohma at gmail.com
Tue Jun 17 20:37:09 CEST 2008


On Jun 17, 12:59 pm, Gandalf <goldn... at gmail.com> wrote:
> On Jun 17, 7:49 pm, Mike Driscoll <kyoso... at gmail.com> wrote:
>
>
>
> > On Jun 17, 11:45 am, Gandalf <goldn... at gmail.com> wrote:
>
> > > On Jun 17, 6:43 pm, Gandalf <goldn... at gmail.com> wrote:
>
> > > > Hi every one. What is the similar python WX style property for CSS
> > > >text-align?
>
> > > > I need this item text to start from the right direction:
>
> > > > aaa= html.HtmlWindow(self, -1, style=wx.SIMPLE_BORDER, size=(250, 60))
> > > >         aaa.LoadPage('../../aa.html')
>
> > > > Thanks!
>
> > > *right to the left direction...
>
> > > And I'm using pythin 2.5 on XP (I forget to mention...)
>
> > The HtmlWindow widget can only display simple html. So, while you
> > cannot use CSS, you should be able to use the simple html alignment
> > directives. Check out the following site for pointers:
>
> >http://www.htmlite.com/lite008.php
>
> > If you want to be able to use CSS and javascript, you'll want to use
> > the ActiveX_IEHtmlWindow (wx.lib.iewin) widget instead as it embeds
> > Internet Explorer.
>
> > Mike
>
> well thanks it seems useful...
> My question is about general items in WX and how to position them
> inside an element without using CSS. It's only coincidence My item is
> HtmlWindow

Positioning the widgets within a container widgets (such as a
wx.Window, wx.Panel or wx.Frame) is usually done with sizers.
Something like this:

mySizer.Add(myWidget, 0, wx.ALIGN_RIGHT)

I've written a few tutorials on aligning widgets in various types of
sizers. You might find them helpful. There are located here:
http://www.blog.pythonlibrary.org

You might also find this site useful too: http://www.zetcode.com/wxpython/layout/

Mike



More information about the Python-list mailing list