1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| #!/usr/bin/env python
#-*- encoding: utf8 -*-
import re, string, math, sys, array, struct, os
import wx
import wx.py
import wx.aui
from random import sample
rep_prog = os.path.dirname(sys.argv[0])
class MyDlg(wx.Dialog):
def __init__(self, parent):
wx.Dialog.__init__(self, parent, -1, 'MyDlg', size=(800, 512))
panel = wx.Panel(self, -1, size=(128, 128), pos=(400, 0))
sizer = wx.BoxSizer(wx.VERTICAL)
self.SetSizer(sizer)
bmp = wx.StaticBitmap(self, bitmap=wx.Bitmap(os.path.join(rep_prog,"image","demo.png")))
slder1 = wx.Slider(self, minValue=0, maxValue=100, pos=(30, 202), size=(350, -1), style=wx.SL_HORIZONTAL | wx.SL_AUTOTICKS | wx.SL_LABELS)
if __name__ == '__main__':
app = wx.PySimpleApp()
dlg = MyDlg(None)
dlg.ShowModal()
dlg.Destroy() |
Partager