Wxpython Basic controls-Static text controls

Source: Internet
Author: User

#coding =utf-8import wxclass statictextframe (WX. Frame):     def __init__ (self):         wx. frame.__init__ (self,none,-1, ' Static text example ', size= (400,300))          panel = wx. Panel (self,-1)          #静态文本   static text for foreground and background colors          wx. Statictext (panel,-1, "This is an example of static text", (100,10))          rev = wx. Statictext (panel,-1, ' static text with reversed colors ', (100,30))          rev. Setforegroundcolour (' white ')         rev. Setbackgroundcolour (' black ')          #居中的文本          center = wx. Statictext (panel,-1, ' align&Nbsp;center ', (100,50), (160,-1), WX. Align_center)          #指定新字体的静态文本          str =  "You can also change the font"          text = wx. Statictext (Panel,-1,str, (20,100))         font = wx. Font (18,wx. Decorative,wx. Italic,wx. NORMAL)         text. SetFont (font)          #显示多行文本  tyle=wx. The align_right  is aligned         wx. Statictext (panel,-1, ' multi-line text \n can also \n be right aligned  \n \n even with a blank ', (220,150), style=wx. Align_right)                  App = wx. Pysimpleapp () Statictextframe (). Show () app. MainlooP () 


This article is from the "Anaf" blog, make sure to keep this source http://anngle.blog.51cto.com/5542868/1657806

Wxpython Basic controls-Static text controls

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.