当前位置: 首页>>代码示例>>Python>>正文


Python wx.MODERN属性代码示例

本文整理汇总了Python中wx.MODERN属性的典型用法代码示例。如果您正苦于以下问题:Python wx.MODERN属性的具体用法?Python wx.MODERN怎么用?Python wx.MODERN使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在wx的用法示例。


在下文中一共展示了wx.MODERN属性的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import MODERN [as 别名]
def __init__(self,
                 String,
                 xy,
                 Size=24,
                 Color="Black",
                 BackgroundColor=None,
                 Family=wx.MODERN,
                 Style=wx.NORMAL,
                 Weight=wx.NORMAL,
                 Underlined=False,
                 Font=None):
        FloatCanvas.Text.__init__(self,
                                  String,
                                  xy,
                                  Size=Size,
                                  Color=Color,
                                  BackgroundColor=BackgroundColor,
                                  Family=Family,
                                  Style=Style,
                                  Weight=Weight,
                                  Underlined=Underlined,
                                  Font=Font) 
开发者ID:dougthor42,项目名称:wafer_map,代码行数:24,代码来源:wm_legend.py

示例2: set_display_font_style

# 需要导入模块: import wx [as 别名]
# 或者: from wx import MODERN [as 别名]
def set_display_font_style(self, style):
    # TODO: make this not stupid
    # TODO: _actual_ font support
    self.runtime_display.set_font_style(
      wx.MODERN if style == 'monospace' else wx.DEFAULT) 
开发者ID:ME-ICA,项目名称:me-ica,代码行数:7,代码来源:base_window.py

示例3: getFontStyle

# 需要导入模块: import wx [as 别名]
# 或者: from wx import MODERN [as 别名]
def getFontStyle(self):
        """
        Force wx.Modern style to support legacy
        monospace_display param when present
        """
        return (wx.MODERN
                if self.buildSpec['monospace_display']
                else wx.DEFAULT) 
开发者ID:chriskiehl,项目名称:Gooey,代码行数:10,代码来源:console.py

示例4: _makeFonts

# 需要导入模块: import wx [as 别名]
# 或者: from wx import MODERN [as 别名]
def _makeFonts(self):
        self._sysFont = wx.SystemSettings.GetFont(wx.SYS_SYSTEM_FONT)
        self._labelFont = wx.Font(self._sysFont.GetPointSize(), wx.DEFAULT, wx.NORMAL, wx.BOLD)
        self._modernFont = wx.Font(self._sysFont.GetPointSize(), wx.MODERN, wx.NORMAL, wx.NORMAL)
        self._smallerFont = wx.Font(self._sysFont.GetPointSize()-2, wx.DEFAULT, wx.NORMAL, wx.NORMAL) 
开发者ID:andreas-p,项目名称:admin4,代码行数:7,代码来源:globals.py

示例5: __set_properties

# 需要导入模块: import wx [as 别名]
# 或者: from wx import MODERN [as 别名]
def __set_properties(self):
        # begin wxGlade: UIBugDialog.__set_properties
        self.SetTitle(_("Error Dialog"))
        self.SetSize((600, 400))
        self.SetFocus()
        self.tc_details.SetFont(wx.Font(10, wx.MODERN, wx.NORMAL, wx.NORMAL, 0, ""))
        self.tc_howto_report.SetFont(wx.Font(10, wx.MODERN, wx.NORMAL, wx.NORMAL, 0, ""))
        compat.SetToolTip( self.btn_copy, _("Copy error details to clipboard") )
        self.btn_ok.SetDefault()
        # end wxGlade 
开发者ID:wxGlade,项目名称:wxGlade,代码行数:12,代码来源:bugdialog_ui.py

示例6: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import MODERN [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 = [] 
开发者ID:Pragmatismo,项目名称:Pigrow,代码行数:37,代码来源:local_display.py

示例7: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import MODERN [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 
开发者ID:wxGlade,项目名称:wxGlade,代码行数:47,代码来源:FontTest28.py

示例8: DoDrawing

# 需要导入模块: import wx [as 别名]
# 或者: from wx import MODERN [as 别名]
def DoDrawing(self, dc, printing=False):
        if printing:
            if getattr(dc, "printing", False):
                font = wx.Font(self.GetFont().GetPointSize(), wx.MODERN, wx.NORMAL, wx.NORMAL)
                dc.SetFont(font)
            else:
                dc.SetFont(self.GetFont())
        else:
            dc.SetBackground(wx.Brush(self.Editor.GetBackgroundColour()))
            dc.Clear()
            dc.BeginDrawing()
        if self.Scaling is not None and self.DrawGrid and not printing:
            dc.SetPen(wx.TRANSPARENT_PEN)
            dc.SetBrush(self.GridBrush)
            xstart, ystart = self.GetViewStart()
            window_size = self.Editor.GetClientSize()
            width, height = self.Editor.GetVirtualSize()
            width = int(max(width, xstart * SCROLLBAR_UNIT + window_size[0]) / self.ViewScale[0])
            height = int(max(height, ystart * SCROLLBAR_UNIT + window_size[1]) / self.ViewScale[1])
            dc.DrawRectangle(1, 1, width, height)
        if self.PageSize is not None and not printing:
            dc.SetPen(self.PagePen)
            xstart, ystart = self.GetViewStart()
            window_size = self.Editor.GetClientSize()
            if self.PageSize[0] != 0:
                for x in xrange(self.PageSize[0] - (xstart * SCROLLBAR_UNIT) % self.PageSize[0], int(window_size[0] / self.ViewScale[0]), self.PageSize[0]):
                    dc.DrawLine(xstart * SCROLLBAR_UNIT + x + 1, int(ystart * SCROLLBAR_UNIT / self.ViewScale[0]),
                                xstart * SCROLLBAR_UNIT + x + 1, int((ystart * SCROLLBAR_UNIT + window_size[1]) / self.ViewScale[0]))
            if self.PageSize[1] != 0:
                for y in xrange(self.PageSize[1] - (ystart * SCROLLBAR_UNIT) % self.PageSize[1], int(window_size[1] / self.ViewScale[1]), self.PageSize[1]):
                    dc.DrawLine(int(xstart * SCROLLBAR_UNIT / self.ViewScale[0]), ystart * SCROLLBAR_UNIT + y + 1,
                                int((xstart * SCROLLBAR_UNIT + window_size[0]) / self.ViewScale[1]), ystart * SCROLLBAR_UNIT + y + 1)

        # Draw all elements
        for comment in self.Comments.itervalues():
            if comment != self.SelectedElement and (comment.IsVisible() or printing):
                comment.Draw(dc)
        for wire in self.Wires.iterkeys():
            if wire != self.SelectedElement and (wire.IsVisible() or printing):
                if not self.Debug or not wire.GetValue():
                    wire.Draw(dc)
        if self.Debug:
            for wire in self.Wires.iterkeys():
                if wire != self.SelectedElement and (wire.IsVisible() or printing) and wire.GetValue():
                    wire.Draw(dc)
        for block in self.Blocks.itervalues():
            if block != self.SelectedElement and (block.IsVisible() or printing):
                block.Draw(dc)

        if self.SelectedElement is not None and (self.SelectedElement.IsVisible() or printing):
            self.SelectedElement.Draw(dc)

        if not printing:
            if self.Debug:
                self.InstanceName.Draw(dc)
            if self.rubberBand.IsShown():
                self.rubberBand.Draw(dc)
            dc.EndDrawing() 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:60,代码来源:Viewer.py


注:本文中的wx.MODERN属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。