本文整理汇总了Python中Resources.getOrangeArrowRightBitmap方法的典型用法代码示例。如果您正苦于以下问题:Python Resources.getOrangeArrowRightBitmap方法的具体用法?Python Resources.getOrangeArrowRightBitmap怎么用?Python Resources.getOrangeArrowRightBitmap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Resources
的用法示例。
在下文中一共展示了Resources.getOrangeArrowRightBitmap方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import Resources [as 别名]
# 或者: from Resources import getOrangeArrowRightBitmap [as 别名]
def __init__(self, parent):
wx.Panel.__init__(self, parent=parent)
self.mframe = self.Parent.mframe
# Set the background colour
bmp = wx.EmptyBitmap(500, 500)
dc = wx.MemoryDC()
dc.SelectObject(bmp)
solidbrush = wx.Brush(BG_COLOR, wx.SOLID)
dc.SetBrush(solidbrush)
dc.DrawRectangle(0, 0, 500, 500)
self.bg = wx.StaticBitmap(self, -1, bmp, (-2, -2))
# Set parent frame value
self.pf = parent
while self.pf.Parent is not None:
self.pf = self.pf.Parent
self.sizer = wx.BoxSizer(wx.VERTICAL)
self.hbox00 = wx.BoxSizer(wx.HORIZONTAL)
self.hbox01 = wx.BoxSizer(wx.HORIZONTAL)
# Generate Graph button
vbox00 = wx.BoxSizer(wx.VERTICAL)
self.btn_gg = wx.Button(self, label="Generate Graph", size=BUTTON_SIZE)
self.btn_gg.Bind(wx.EVT_BUTTON, self.OnGenerateGraph)
self.Parent.btn_disabled.append(self.btn_gg)
self.Parent.buttons.append(self.btn_gg)
vbox00.Add(self.btn_gg)
self.sizer.Add(vbox00,1,wx.TOP,10)
# Tour button
vbox10 = wx.BoxSizer(wx.VERTICAL)
self.btn_tour = wx.Button(self, label="Tour All Edges", size=BUTTON_SIZE)
self.btn_tour.Bind(wx.EVT_BUTTON, self.OnTour)
self.Parent.btn_disabled.append(self.btn_tour)
self.Parent.buttons.append(self.btn_tour)
vbox10.Add(self.btn_tour)
self.sizer.Add(vbox10,1,wx.TOP,10)
# # Show/Hide map route button
vbox13 = wx.BoxSizer(wx.VERTICAL)
self.btn_rte = wx.Button(self, label="Hide Route", size=BUTTON_SIZE)
self.btn_rte.Bind(wx.EVT_BUTTON, self.OnShowHideRoute)
self.btn_rte.Enable(False)
self.Parent.buttons.append(self.btn_rte)
vbox13.Add(self.btn_rte)
self.sizer.Add(vbox13,1, wx.TOP,10)
vbox03 = wx.BoxSizer(wx.VERTICAL)
lbl_font = self.pf.font
lbl_font.SetPointSize(12)
self.lbl = wx.StaticText(self, label="Find:", style=wx.CENTER)
self.lbl.SetFont(lbl_font)
self.lbl.SetForegroundColour((85,85,80))
vbox03.Add(self.lbl, 0, wx.LEFT, 18)
self.hbox01.Add(vbox03,0,wx.TOP,19)
self.pf.font.SetPointSize(14)
# Textbox
vbox06 = wx.BoxSizer(wx.VERTICAL)
vbox06.AddSpacer(7)
self.txt = wx.TextCtrl(self, size=(58,28), style=wx.TE_CENTER)
self.txt.SetMaxLength(4) #Maximum of 4 characters
self.txt.SetFont(self.pf.font)
self.txt.SetForegroundColour((255,131,79))
self.txt.SetBackgroundColour((85,85,80))
st = ("Usage: write \"N\" or \"E\" followed by a number.\n\n"
"\"N14\" finds Node 14, \"E23\" finds Edge 23, etc.")
self.txt.SetToolTip( wx.ToolTip(st) )
vbox06.Add(self.txt,1,wx.RIGHT,3)
self.hbox01.Add(vbox06,1,wx.TOP|wx.LEFT,7)
# Go button
vbox09 = wx.BoxSizer(wx.VERTICAL)
vbox09.AddSpacer(9)
self.btn_go = wx.BitmapButton(self, -1, Resources.getOrangeArrowRightBitmap(),
size=(40,33), style=wx.NO_BORDER)
self.btn_go.SetToolTip( wx.ToolTip("Find a node or edge") )
# self.btn_go = wx.Button(self, label="Find", size=(53,32))
self.btn_go.Bind(wx.EVT_BUTTON, self.OnFind)
self.Parent.btn_disabled.append(self.btn_go)
# self.Parent.buttons.append(self.btn_go)
vbox09.Add(self.btn_go)
self.hbox01.Add(vbox09,1,wx.TOP|wx.BOTTOM,2)
self.sizer.Add(self.hbox01)
self.SetSizer(self.sizer)
self.Layout()