本文整理匯總了Python中wx.DECORATIVE屬性的典型用法代碼示例。如果您正苦於以下問題:Python wx.DECORATIVE屬性的具體用法?Python wx.DECORATIVE怎麽用?Python wx.DECORATIVE使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類wx
的用法示例。
在下文中一共展示了wx.DECORATIVE屬性的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
# 需要導入模塊: import wx [as 別名]
# 或者: from wx import DECORATIVE [as 別名]
def __init__(self):
#This is a temporary fudge soon to be cleaned and used more widely
#
## paths
#
# gui system paths
shared_data.cwd = os.getcwd()
shared_data.ui_img_path = os.path.join(shared_data.cwd, "ui_images")
shared_data.graph_modules_path = os.path.join(shared_data.cwd, "graph_modules")
sys.path.append(shared_data.graph_modules_path)
shared_data.graph_presets_path = os.path.join(shared_data.cwd, "graph_presets")
localpath = str(os.getcwd()).split("/scripts")[0]
print (localpath)
shared_data.local_logs_path = os.path.join(localpath, "logs")
local_graphs_path = os.path.join(localpath, "graphs")
shared_data.local_graph_path = os.path.join(local_graphs_path, "live_rolling.png")
#shared_data.local_graph_path = "/home/pragmo/frompigrow/carputer/graphs/live_rolling.png"
#
## Fonts
#
shared_data.title_font = wx.Font(28, wx.DECORATIVE, wx.ITALIC, wx.NORMAL)
shared_data.sub_title_font = wx.Font(15, wx.DECORATIVE, wx.ITALIC, wx.NORMAL)
shared_data.item_title_font = wx.Font(16, wx.DECORATIVE, wx.ITALIC, wx.NORMAL)
shared_data.info_font = wx.Font(14, wx.MODERN, wx.ITALIC, wx.NORMAL)
shared_data.large_info_font = wx.Font(16, wx.MODERN, wx.ITALIC, wx.NORMAL)
#
## Options
#
graph_data_option = "DHT22_Temp.txt"
shared_data.graph_data_preset_choice = os.path.join(shared_data.graph_presets_path, graph_data_option)
show_duration = 2 #hours
#
## Data
#
shared_data.list_of_datasets = []
示例2: __init__
# 需要導入模塊: import wx [as 別名]
# 或者: from wx import DECORATIVE [as 別名]
def __init__(self, *args, **kwds):
# begin wxGlade: MyFrame.__init__
kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE
wx.Frame.__init__(self, *args, **kwds)
self.SetSize((400, 300))
self.SetTitle("frame")
sizer_1 = wx.BoxSizer(wx.VERTICAL)
self.text_ctrl_1 = wx.TextCtrl(self, wx.ID_ANY, "Some Input", style=wx.TE_READONLY)
self.text_ctrl_1.SetBackgroundColour(wx.Colour(0, 255, 127))
self.text_ctrl_1.SetForegroundColour(wx.Colour(255, 0, 0))
self.text_ctrl_1.SetFont(wx.Font(16, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
self.text_ctrl_1.SetFocus()
sizer_1.Add(self.text_ctrl_1, 1, wx.ALL | wx.EXPAND, 5)
label_1 = wx.StaticText(self, wx.ID_ANY, "label_1")
sizer_1.Add(label_1, 0, 0, 0)
label_2 = wx.StaticText(self, wx.ID_ANY, "label_2")
label_2.SetFont(wx.Font(8, wx.DECORATIVE, wx.SLANT, wx.LIGHT, 0, ""))
sizer_1.Add(label_2, 0, 0, 0)
label_3 = wx.StaticText(self, wx.ID_ANY, "label_3")
label_3.SetFont(wx.Font(8, wx.ROMAN, wx.ITALIC, wx.BOLD, 0, ""))
sizer_1.Add(label_3, 0, 0, 0)
label_4 = wx.StaticText(self, wx.ID_ANY, "label_4")
label_4.SetFont(wx.Font(8, wx.SCRIPT, wx.NORMAL, wx.NORMAL, 0, ""))
sizer_1.Add(label_4, 0, 0, 0)
label_5 = wx.StaticText(self, wx.ID_ANY, "label_5")
label_5.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.NORMAL, 0, ""))
sizer_1.Add(label_5, 0, 0, 0)
label_6 = wx.StaticText(self, wx.ID_ANY, "label_6")
label_6.SetFont(wx.Font(12, wx.MODERN, wx.NORMAL, wx.NORMAL, 1, ""))
sizer_1.Add(label_6, 0, 0, 0)
self.SetSizer(sizer_1)
self.Layout()
# end wxGlade
# end of class MyFrame