20170830 wxPython的简单使用之布局

20170830 wxPython的简单使用

.wiz-code-container { position: relative; padding: 8px 0; margin: 5px 25px 5px 5px; text-indent: 0 }
.CodeMirror { font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; color: black; font-size: 0.83rem }
.CodeMirror-lines { padding: 4px 0 }
.CodeMirror pre { padding: 0 4px }
.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler { background-color: white }
.CodeMirror-gutters { border-right: 1px solid #ddd; background-color: #f7f7f7; white-space: nowrap }
.CodeMirror-linenumbers { }
.CodeMirror-linenumber { padding: 0 3px 0 5px; min-width: 20px; text-align: right; color: #999; white-space: nowrap }
.CodeMirror-guttermarker { color: black }
.CodeMirror-guttermarker-subtle { color: #999 }
.CodeMirror-cursor { border-left: 1px solid black; border-right: none; width: 0 }
.CodeMirror div.CodeMirror-secondarycursor { border-left: 1px solid silver }
.cm-fat-cursor .CodeMirror-cursor { width: auto; border: 0 !important; background: #7e7 }
.cm-fat-cursor div.CodeMirror-cursors { z-index: 1 }
.cm-animate-fat-cursor { width: auto; border: 0; background-color: #7e7 }
.CodeMirror-overwrite .CodeMirror-cursor { }
.cm-tab { display: inline-block; text-decoration: inherit }
.CodeMirror-rulers { position: absolute; left: 0; right: 0; top: -50px; bottom: -20px; overflow: hidden }
.CodeMirror-ruler { border-left: 1px solid #ccc; top: 0; bottom: 0; position: absolute }
.cm-s-default .cm-header { color: blue }
.cm-s-default .cm-quote { color: #090 }
.cm-negative { color: #d44 }
.cm-positive { color: #292 }
.cm-header,.cm-strong { font-weight: bold }
.cm-em { font-style: italic }
.cm-link { text-decoration: underline }
.cm-strikethrough { text-decoration: line-through }
.cm-s-default .cm-keyword { color: #708 }
.cm-s-default .cm-atom { color: #219 }
.cm-s-default .cm-number { color: #164 }
.cm-s-default .cm-def { color: #00f }
.cm-s-default .cm-variable,.cm-s-default .cm-punctuation,.cm-s-default .cm-property,.cm-s-default .cm-operator { }
.cm-s-default .cm-variable-2 { color: #05a }
.cm-s-default .cm-variable-3 { color: #085 }
.cm-s-default .cm-comment { color: #a50 }
.cm-s-default .cm-string { color: #a11 }
.cm-s-default .cm-string-2 { color: #f50 }
.cm-s-default .cm-meta { color: #555 }
.cm-s-default .cm-qualifier { color: #555 }
.cm-s-default .cm-builtin { color: #30a }
.cm-s-default .cm-bracket { color: #997 }
.cm-s-default .cm-tag { color: #170 }
.cm-s-default .cm-attribute { color: #00c }
.cm-s-default .cm-hr { color: #999 }
.cm-s-default .cm-link { color: #00c }
.cm-s-default .cm-error { color: #f00 }
.cm-invalidchar { color: #f00 }
.CodeMirror-composing { border-bottom: 2px solid }
div.CodeMirror span.CodeMirror-matchingbracket { color: #0f0 }
div.CodeMirror span.CodeMirror-nonmatchingbracket { color: #f22 }
.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3) }
.CodeMirror-activeline-background { background: #e8f2ff }
.CodeMirror { position: relative; background: #f5f5f5 }
.CodeMirror-scroll { overflow: hidden !important; margin-bottom: 0; margin-right: 0; padding: 10px 0 16px; outline: none; position: relative }
.CodeMirror-sizer { position: relative; border-right: 30px solid transparent }
.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler { position: absolute; z-index: 6; display: none }
.CodeMirror-vscrollbar { right: 0; top: 0 }
.CodeMirror-hscrollbar { bottom: 0; left: 0 !important }
.CodeMirror-scrollbar-filler { right: 0; bottom: 0 }
.CodeMirror-gutter-filler { left: 0; bottom: 0 }
.CodeMirror-gutters { position: absolute; left: 0; top: -5px; min-height: 100%; z-index: 3 }
.CodeMirror-gutter { white-space: normal; height: inherit; display: inline-block; vertical-align: top; margin-bottom: -30px }
.CodeMirror-gutter-wrapper { position: absolute; z-index: 4; background: none !important; border: none !important }
.CodeMirror-gutter-background { position: absolute; top: 0; bottom: 0; z-index: 4 }
.CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; text-align: center }
.CodeMirror-gutter-wrapper ::selection { background-color: transparent }
.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }
.CodeMirror-lines { cursor: text; min-height: 1px }
.CodeMirror pre { border-width: 0; background: transparent; font-family: inherit; font-size: inherit; margin: 0; white-space: pre; line-height: inherit; color: inherit; z-index: 2; position: relative; overflow: visible }
.CodeMirror-wrap pre { white-space: pre-wrap }
.CodeMirror-linebackground { position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: 0 }
.CodeMirror-linewidget { position: relative; z-index: 2; overflow: auto }
.CodeMirror-widget { }
.CodeMirror-rtl pre { direction: rtl }
.CodeMirror-code { outline: none }
.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber { }
.CodeMirror-measure { position: absolute; width: 100%; height: 0; overflow: hidden; visibility: hidden }
.CodeMirror-cursor { position: absolute }
.CodeMirror-measure pre { position: static }
div.CodeMirror-cursors { visibility: hidden; position: relative; z-index: 3 }
div.CodeMirror-dragcursors { visibility: visible }
.CodeMirror-focused div.CodeMirror-cursors { visibility: visible }
.CodeMirror-selected { background: #d9d9d9 }
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0 }
.CodeMirror-crosshair { cursor: crosshair }
.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection { background: #d7d4f0 }
.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0 }
.cm-searching { background: rgba(255, 255, 0, .4) }
.cm-force-border { padding-right: .1px }
.cm-tab-wrap-hack::after { content: "" }
span.CodeMirror-selectedtext { background: none }
.CodeMirror-activeline-background,.CodeMirror-selected { }
.CodeMirror-blur .CodeMirror-activeline-background,.CodeMirror-blur .CodeMirror-selected { visibility: hidden }
.CodeMirror-blur .CodeMirror-matchingbracket { color: inherit !important; outline: none !important; text-decoration: none !important }
.cm-s-blackboard.CodeMirror { background: #0C1021; color: #F8F8F8 }
.cm-s-blackboard div.CodeMirror-selected { background: #253B76 }
.cm-s-blackboard .CodeMirror-line::selection,.cm-s-blackboard .CodeMirror-line>span::selection,.cm-s-blackboard .CodeMirror-line>span>span::selection { background: rgba(37, 59, 118, .99) }
.cm-s-blackboard .CodeMirror-line::-moz-selection, .cm-s-blackboard .CodeMirror-line > span::-moz-selection, .cm-s-blackboard .CodeMirror-line > span > span::-moz-selection { background: rgba(37, 59, 118, .99) }
.cm-s-blackboard .CodeMirror-gutters { background: #0C1021; border-right: 0 }
.cm-s-blackboard .CodeMirror-guttermarker { color: #FBDE2D }
.cm-s-blackboard .CodeMirror-guttermarker-subtle { color: #888 }
.cm-s-blackboard .CodeMirror-linenumber { color: #888 }
.cm-s-blackboard .CodeMirror-cursor { border-left: 1px solid #A7A7A7 }
.cm-s-blackboard .cm-keyword { color: #FBDE2D }
.cm-s-blackboard .cm-atom { color: #D8FA3C }
.cm-s-blackboard .cm-number { color: #D8FA3C }
.cm-s-blackboard .cm-def { color: #8DA6CE }
.cm-s-blackboard .cm-variable { color: #FF6400 }
.cm-s-blackboard .cm-operator { color: #FBDE2D }
.cm-s-blackboard .cm-comment { color: #AEAEAE }
.cm-s-blackboard .cm-string { color: #61CE3C }
.cm-s-blackboard .cm-string-2 { color: #61CE3C }
.cm-s-blackboard .cm-meta { color: #D8FA3C }
.cm-s-blackboard .cm-builtin { color: #8DA6CE }
.cm-s-blackboard .cm-tag { color: #8DA6CE }
.cm-s-blackboard .cm-attribute { color: #8DA6CE }
.cm-s-blackboard .cm-header { color: #FF6400 }
.cm-s-blackboard .cm-hr { color: #AEAEAE }
.cm-s-blackboard .cm-link { color: #8DA6CE }
.cm-s-blackboard .cm-error { background: #9D1E15; color: #F8F8F8 }
.cm-s-blackboard .CodeMirror-activeline-background { background: #3C3636 }
.cm-s-blackboard .CodeMirror-matchingbracket { outline: 1px solid grey; color: white !important }
.cm-s-monokai.CodeMirror { background: #272822; color: #f8f8f2 }
.cm-s-monokai div.CodeMirror-selected { background: #49483E }
.cm-s-monokai .CodeMirror-line::selection,.cm-s-monokai .CodeMirror-line>span::selection,.cm-s-monokai .CodeMirror-line>span>span::selection { background: rgba(73, 72, 62, .99) }
.cm-s-monokai .CodeMirror-line::-moz-selection, .cm-s-monokai .CodeMirror-line > span::-moz-selection, .cm-s-monokai .CodeMirror-line > span > span::-moz-selection { background: rgba(73, 72, 62, .99) }
.cm-s-monokai .CodeMirror-gutters { background: #272822; border-right: 0px }
.cm-s-monokai .CodeMirror-guttermarker { color: white }
.cm-s-monokai .CodeMirror-guttermarker-subtle { color: #d0d0d0 }
.cm-s-monokai .CodeMirror-linenumber { color: #d0d0d0 }
.cm-s-monokai .CodeMirror-cursor { border-left: 1px solid #f8f8f0 }
.cm-s-monokai span.cm-comment { color: #75715e }
.cm-s-monokai span.cm-atom { color: #ae81ff }
.cm-s-monokai span.cm-number { color: #ae81ff }
.cm-s-monokai span.cm-property,.cm-s-monokai span.cm-attribute { color: #a6e22e }
.cm-s-monokai span.cm-keyword { color: #f92672 }
.cm-s-monokai span.cm-builtin { color: #66d9ef }
.cm-s-monokai span.cm-string { color: #e6db74 }
.cm-s-monokai span.cm-variable { color: #f8f8f2 }
.cm-s-monokai span.cm-variable-2 { color: #9effff }
.cm-s-monokai span.cm-variable-3 { color: #66d9ef }
.cm-s-monokai span.cm-def { color: #fd971f }
.cm-s-monokai span.cm-bracket { color: #f8f8f2 }
.cm-s-monokai span.cm-tag { color: #f92672 }
.cm-s-monokai span.cm-header { color: #ae81ff }
.cm-s-monokai span.cm-link { color: #ae81ff }
.cm-s-monokai span.cm-error { background: #f92672; color: #f8f8f0 }
.cm-s-monokai .CodeMirror-activeline-background { background: #373831 }
.cm-s-monokai .CodeMirror-matchingbracket { text-decoration: underline; color: white !important }
html,body { font-size: 12pt }
body { font-family: Helvetica, "Hiragino Sans GB", "微软雅黑", "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 1.6; margin: 0 auto; padding: 1.25rem 1rem }
h1,h2,h3,h4,h5,h6 { margin: 1.25rem 0 0.625rem; padding: 0; font-weight: bold }
h1 { font-size: 1.67rem }
h2 { font-size: 1.5rem }
h3 { font-size: 1.25rem }
h4 { font-size: 1.17rem }
h5 { font-size: 1rem }
h6 { font-size: 1rem; color: #777777; margin: 1rem 0 }
div,p,ul,ol,dl,li { margin: 0 }
blockquote,table,pre,code { margin: 8px 0 }
ul,ol { padding-left: 2rem }
ol.wiz-list-level1>li { list-style-type: decimal }
ol.wiz-list-level2>li { list-style-type: lower-latin }
ol.wiz-list-level3>li { list-style-type: lower-roman }
blockquote { padding: 0 0.75rem }
blockquote>:first-child { margin-top: 0 }
blockquote>:last-child { margin-bottom: 0 }
img { border: 0; max-width: 100%; height: auto !important; margin: 2px 0 }
table { border-collapse: collapse; border: 1px solid #bbbbbb }
td,th { padding: 4px 8px; border-collapse: collapse; border: 1px solid #bbbbbb; min-height: 28px }
.wiz-hide { display: none !important }

wxPython


创建应用程序对象

app = wx.App()<wiz_code_mirror>

xxxxxxxxxx

1

1

1

app = wx.App()

创建窗口window-Frame

win = wx.Frame(None)<wiz_code_mirror>

xxxxxxxxxx

1

1

1

win = wx.Frame(None)

显示窗口

win.Show()<wiz_code_mirror>

xxxxxxxxxx

1

1

1

win.Show()

进入应用程序管理, 循环

app.MainLoop()<wiz_code_mirror>

xxxxxxxxxx

1

1

1

app.MainLoop()

代码

import wx

app = wx.App()
win = wx.Frame(None, title="Geng‘s note", size=(425, 380))

wx.Button(win, label="Open", pos=(245, 5), size=(80, 25))
wx.Button(win, label="Save", pos=(325, 5), size=(80, 25))
wx.TextCtrl(win, pos=(5, 5), size=(240, 25))
wx.TextCtrl(win, pos=(5, 35), size=(400, 300), style=wx.TE_MULTILINE|wx.HSCROLL)

win.Show()
app.MainLoop()<wiz_code_mirror>

x

12

1

import wx

2


3

app = wx.App()

4

win = wx.Frame(None, title="Geng‘s note", size=(425, 380))

5


6

wx.Button(win, label="Open", pos=(245, 5), size=(80, 25))

7

wx.Button(win, label="Save", pos=(325, 5), size=(80, 25))

8

wx.TextCtrl(win, pos=(5, 5), size=(240, 25))

9

wx.TextCtrl(win, pos=(5, 35), size=(400, 300), style=wx.TE_MULTILINE|wx.HSCROLL)

10


11

win.Show()

12

app.MainLoop()


效果


时间: 2024-10-24 18:46:56

20170830 wxPython的简单使用之布局的相关文章

简单的RelativeLayout布局

简单的RelativeLayout布局实例 1 <?xml version="1.0" encoding="utf-8"?> 2 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 android:layout_width="match_parent" 4 android:layout_height=&quo

UWP开发入门(九)——简单界面的布局技巧及屏幕适应

嘿嘿嘿,题目比较绕哈.本篇主要讨论一般情况下,页面的布局技巧,怎么将元素的展现尽量做到分辨率无关.基本的思路仍然是尽量少的标定具体的数字,而是用比列来标注各元素占据的空间. 这里我打算用易信的名片页来举例: Phone的界面看起来不错,大致以纵向排列.最上方是标题栏,头像部分居中,下面的文字以列表形式靠左对齐,最下部为留白.考虑到标题栏需要锚定在顶部,不参与比例分配.头像,文字和留白的占比大致为2.5:4:3.XAML中的Grid定义如下: <Grid.RowDefinitions> <

android 开发 简单的页面布局

package com.example.test; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.Button; import android.widget.LinearLayout; impo

ios学习之简单的登陆布局

哈哈哈哈哈,成为土豪了,必须买个mac开始装逼了,买了也不能闲着 ,顺便就学学ios吧,就学一个简单的登陆界面,反正什么app都有登陆界面.开动! 先看看效果图: 我可以说很丑吗? 上点代码吧: // // MineUiViewController.m // UITabview // // Created by xiaoyuan on 15/4/16. // Copyright (c) 2015年 xiaoyuan. All rights reserved. // #import "MineUi

简单响应式布局展示

1.什么是响应式网页? 一个页面,可以根据浏览设备的不同,以及特性的不同,而自动改变布局.大小等. 优点:可以自动适配PC.PAD.PHONE浏览器屏幕 不足:代码变复杂,需要考虑更多兼容性,并不适合内容非常多网页 5.css文件 1 body { 2 margin: 0; 3 background: #fff; 4 font-family: 'SimHei'; 5 } 6 7 /*只在PC屏幕下执行的样式*/ 8 @media screen and (min-width: 992px) { 9

3个简单的页面布局示例

示例代码 -1 (利用HTML5标签及浮动布局) <style> header nav ul { margin: 15px; list-style: none; height: 50px; } header nav ul li { font-size: 1.5em; color: coral; margin: 10px; float: left; } header nav ul li a { text-decoration: none; } aside { margin-right: 50px

简单的网页布局

作为一个美工烂到家的人,每次想写点网页都很痛苦. 备忘,待完善. css: body { background-color: #f2f2f2; } .container { width: 90%; margin: 0 auto; } .top { text-align: center; background-color: #FF5722; } .top-text { font-size: 30px; color: white; display: inline-block; margin-top:

CSS学习之首页简单布局

作为一个PHPer,在前端方面javascript.jquery这些的日常工作还搞的定.可对于div+css这些东西可就头疼了,所以现在开始学习CSS 跟着燕十八的教程开始从最基础学起,首先练习一个简单首页的布局 1 <html> 2 <head> 3 <title>首页布局</title> 4 <style> 5 #container { 6 width: 1200px; 7 background-color: blue; 8 } 9 #hea

wxpython学习笔记

一.简介 wxPython是Python编程语言的一个GUI工具箱.他使得Python程序员能够轻松的创建具有健壮.功能强大的图形用户界面的程序.它是Python语言对流行的wxWidgets跨平台GUI工具库的绑定.而wxWidgets是用C++语言写成的.和Python语言与wxWidgets GUI工具库一样,wxPython是开源软件.这意味着任何人都可以免费地使用它并且可以查看和修改它的源代码,或者贡献补丁,增加功能.wxPython是跨平台的.这意味着同一个程序可以不经修改地在多种平