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


Python wx.TE_RIGHT属性代码示例

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


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

示例1: display_opt_widget_row

# 需要导入模块: import wx [as 别名]
# 或者: from wx import TE_RIGHT [as 别名]
def display_opt_widget_row(self, row_id):
        """Return a display option widget row."""
        statbox_disp_opts = self.sizer_disp_opts.GetStaticBox()
        row_id = wx.StaticText(statbox_disp_opts, -1, str(row_id))
        row_sax = wx.Choice(statbox_disp_opts, -1, name="SwivelAxisChoice",
                            size=(self.tc_width*0.7, -1),
                            choices=["No swivel", "Left", "Right"])
        row_san = wx.TextCtrl(statbox_disp_opts, -1, size=(self.tc_width*0.69, -1),
                              style=wx.TE_RIGHT)
        row_sol = wx.TextCtrl(statbox_disp_opts, -1, size=(self.tc_width*0.69, -1),
                              style=wx.TE_RIGHT)
        row_sod = wx.TextCtrl(statbox_disp_opts, -1, size=(self.tc_width*0.69, -1),
                              style=wx.TE_RIGHT)
        row_tan = wx.TextCtrl(statbox_disp_opts, -1, size=(self.tc_width*0.69, -1),
                              style=wx.TE_RIGHT)
        row_tov = wx.TextCtrl(statbox_disp_opts, -1, size=(self.tc_width*0.69, -1),
                              style=wx.TE_RIGHT)
        row_tod = wx.TextCtrl(statbox_disp_opts, -1, size=(self.tc_width*0.69, -1),
                              style=wx.TE_RIGHT)
        # Prefill neutral data
        row_sax.SetSelection(0)
        row_san.SetValue("0")
        row_sol.SetValue("0")
        row_sod.SetValue("0")
        row_tan.SetValue("0")
        row_tov.SetValue("0")
        row_tod.SetValue("0")

        row = [row_id, row_sax, row_san, row_sol, row_sod, row_tan, row_tov, row_tod]
        return row 
开发者ID:hhannine,项目名称:superpaper,代码行数:32,代码来源:configuration_dialogs.py

示例2: list_of_textctrl

# 需要导入模块: import wx [as 别名]
# 或者: from wx import TE_RIGHT [as 别名]
def list_of_textctrl(self, ctrl_parent, num_disp, fraction = 1/2):
        tcrtl_list = []
        for i in range(num_disp):
            tcrtl_list.append(
                wx.TextCtrl(ctrl_parent, -1,
                    size=(self.tc_width * fraction, -1),
                    style=wx.TE_RIGHT
                )
            )
        return tcrtl_list 
开发者ID:hhannine,项目名称:superpaper,代码行数:12,代码来源:gui.py

示例3: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import TE_RIGHT [as 别名]
def __init__(self, parent, style):
            wx.PopupTransientWindow.__init__(self, parent, style)
            self.preview = parent
            pnl = wx.Panel(self)
            # pnl.SetBackgroundColour("CADET BLUE")

            st = wx.StaticText(pnl, -1,
                            "Enter the size of adjacent bezels and gap\n"
                            "in millimeters:")
            # self.tc_bez = wx.TextCtrl(pnl, -1, size=(100, -1))
            self.tc_bez = wx.TextCtrl(pnl, -1, style=wx.TE_RIGHT|wx.TE_PROCESS_ENTER)
            self.tc_bez.Bind(wx.EVT_TEXT_ENTER, self.OnEnter)
            self.current_bez_val = None
            butt_save = wx.Button(pnl, label="Apply")
            butt_canc = wx.Button(pnl, label="Cancel")
            butt_save.Bind(wx.EVT_BUTTON, self.onApply)
            butt_canc.Bind(wx.EVT_BUTTON, self.onCancel)
            butt_sizer = wx.BoxSizer(wx.HORIZONTAL)
            # butt_sizer.AddStretchSpacer()
            butt_sizer.Add(self.tc_bez, 0, wx.ALL, 5)
            butt_sizer.Add(butt_save, 0, wx.ALL, 5)
            butt_sizer.Add(butt_canc, 0, wx.ALL, 5)

            sizer = wx.BoxSizer(wx.VERTICAL)
            sizer.Add(st, 0, wx.ALL, 5)
            # sizer.Add(self.tc_bez, 0, wx.ALL, 5)
            sizer.Add(butt_sizer, 0, wx.ALL|wx.EXPAND, 0)
            pnl.SetSizer(sizer)

            sizer.Fit(pnl)
            sizer.Fit(self)
            self.Layout() 
开发者ID:hhannine,项目名称:superpaper,代码行数:34,代码来源:gui.py

示例4: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import TE_RIGHT [as 别名]
def __init__(
        self,
        parent,
        id=-1,
        value=0.0,
        pos=wx.DefaultPosition,
        size=wx.DefaultSize,
        style=wx.TE_RIGHT,
        validator=wx.DefaultValidator,
        name="eg.SmartSpinNumCtrl",
        **kwargs
    ):
        self.initValue = value
        self.value = value
        self.parent = parent
        self.kwargs = kwargs
        self.name = name
        self.nW = size[0] if size[0] != -1 else 60
        self.tW = size[0] if size[0] != -1 else 120
        if 'numWidth' in self.kwargs:
            self.nW = self.kwargs['numWidth']
            del self.kwargs['numWidth']
        if 'textWidth' in self.kwargs:
            self.tW = self.kwargs['textWidth']
            del self.kwargs['textWidth']

        wx.Window.__init__(self, parent, id, pos, size, 0)
        self.SetThemeEnabled(True)
        self.sizer = wx.BoxSizer(wx.HORIZONTAL)
        self.SetSizer(self.sizer)
        self.ctrl = self.CreateCtrl(int(not isinstance(value, (int, float))))
        self.Bind(wx.EVT_SIZE, self.OnSize) 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:34,代码来源:SmartSpinNumCtrl.py

示例5: GetAlignmentForText

# 需要导入模块: import wx [as 别名]
# 或者: from wx import TE_RIGHT [as 别名]
def GetAlignmentForText(self):
        """
        Return the alignment of this column in a form that can be used as
        a style flag on a text control
        """
        return {
            "l": wx.TE_LEFT,
            "c": wx.TE_CENTRE,
            "r": wx.TE_RIGHT,
        }.get(self.align[:1], wx.TE_LEFT)

    #-------------------------------------------------------------------------------
    # Value accessing 
开发者ID:JackonYang,项目名称:bookhub,代码行数:15,代码来源:ObjectListView.py

示例6: _init_ctrls

# 需要导入模块: import wx [as 别名]
# 或者: from wx import TE_RIGHT [as 别名]
def _init_ctrls(self, prnt):
        wx.Dialog.__init__(self, id=ID_USERTYPEDIALOG, name='UserTypeDialog',
              parent=prnt, pos=wx.Point(376, 223), size=wx.Size(444, 210),
              style=wx.DEFAULT_DIALOG_STYLE, title=_('Add User Type'))
        self.SetClientSize(wx.Size(444, 210))

        self.staticText1 = wx.StaticText(id=ID_USERTYPEDIALOGSTATICTEXT1,
              label=_('Type:'), name='staticText1', parent=self,
              pos=wx.Point(0, 0), size=wx.Size(0, 17), style=0)

        self.Type = wx.ComboBox(choices=[], id=ID_USERTYPEDIALOGTYPE,
              name='Type', parent=self, pos=wx.Point(0, 0),
              size=wx.Size(0, 28), style=wx.CB_READONLY)
        self.Type.Bind(wx.wx.EVT_COMBOBOX, self.OnTypeChoice,
              id=ID_USERTYPEDIALOGTYPE)

        self.Spacer = wx.Panel(id=ID_MAPVARIABLEDIALOGSPACER,
              name='Spacer', parent=self, pos=wx.Point(0, 0),
              size=wx.Size(0, 0), style=wx.TAB_TRAVERSAL)

        self.staticBox1 = wx.StaticBox(id=ID_USERTYPEDIALOGSTATICBOX1,
              label=_('Values'), name='staticBox1', parent=self,
              pos=wx.Point(0, 0), size=wx.Size(0, 0), style=0)

        self.staticText2 = wx.StaticText(id=ID_USERTYPEDIALOGSTATICTEXT2,
              label=_('Minimum:'), name='staticText2', parent=self,
              pos=wx.Point(0, 0), size=wx.Size(80, 17), style=0)

        self.Min = wx.TextCtrl(id=ID_USERTYPEDIALOGMIN, name='Min',
              parent=self, pos=wx.Point(0, 0), size=wx.Size(0, 24), 
              style=wx.TE_RIGHT, value='0')

        self.staticText3 = wx.StaticText(id=ID_USERTYPEDIALOGSTATICTEXT3,
              label=_('Maximum:'), name='staticText3', parent=self,
              pos=wx.Point(0, 0), size=wx.Size(80, 17), style=0)

        self.Max = wx.TextCtrl(id=ID_USERTYPEDIALOGMAX, name='Max',
              parent=self, pos=wx.Point(0, 0), size=wx.Size(0, 24), 
              style=wx.TE_RIGHT, value='0')

        self.staticText4 = wx.StaticText(id=ID_USERTYPEDIALOGSTATICTEXT4,
              label=_('Length:'), name='staticText4', parent=self,
              pos=wx.Point(0, 0), size=wx.Size(80, 17), style=0)

        self.Length = wx.TextCtrl(id=ID_USERTYPEDIALOGLENGTH, name='Length',
              parent=self, pos=wx.Point(0, 0), size=wx.Size(0, 24), 
              style=wx.TE_RIGHT, value='0')

        self.ButtonSizer = self.CreateButtonSizer(wx.OK|wx.CANCEL)
        self.Bind(wx.EVT_BUTTON, self.OnOK, id=self.ButtonSizer.GetAffirmativeButton().GetId())
        
        self._init_sizers() 
开发者ID:jgeisler0303,项目名称:CANFestivino,代码行数:54,代码来源:commondialogs.py


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