Python wx.Size() Examples
The following are 30
code examples of wx.Size().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
wx
, or try the search function
.
Example #1
Source File: misc.py From trelby with GNU General Public License v2.0 | 7 votes |
def __init__(self, parent, text, title): wx.Dialog.__init__(self, parent, -1, title, style = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER) vsizer = wx.BoxSizer(wx.VERTICAL) tc = wx.TextCtrl(self, -1, size = wx.Size(400, 200), style = wx.TE_MULTILINE | wx.TE_READONLY | wx.TE_LINEWRAP) tc.SetValue(text) vsizer.Add(tc, 1, wx.EXPAND); vsizer.Add(wx.StaticLine(self, -1), 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 5) okBtn = gutil.createStockButton(self, "OK") vsizer.Add(okBtn, 0, wx.ALIGN_CENTER) util.finishWindow(self, vsizer) wx.EVT_BUTTON(self, okBtn.GetId(), self.OnOK) okBtn.SetFocus()
Example #2
Source File: objdictedit.py From CANFestivino with GNU Lesser General Public License v2.1 | 6 votes |
def _init_ctrls(self, prnt): wx.Frame.__init__(self, id=ID_OBJDICTEDIT, name='objdictedit', parent=prnt, pos=wx.Point(149, 178), size=wx.Size(1000, 700), style=wx.DEFAULT_FRAME_STYLE, title=_('Objdictedit')) self._init_utils() self.SetClientSize(wx.Size(1000, 700)) self.SetMenuBar(self.MenuBar) self.Bind(wx.EVT_CLOSE, self.OnCloseFrame) if not self.ModeSolo: self.Bind(wx.EVT_MENU, self.OnSaveMenu, id=wx.ID_SAVE) accel = wx.AcceleratorTable([wx.AcceleratorEntry(wx.ACCEL_CTRL, 83, wx.ID_SAVE)]) self.SetAcceleratorTable(accel) self.FileOpened = wx.Notebook(id=ID_OBJDICTEDITFILEOPENED, name='FileOpened', parent=self, pos=wx.Point(0, 0), size=wx.Size(0, 0), style=0) self.FileOpened.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self.OnFileSelectedChanged, id=ID_OBJDICTEDITFILEOPENED) self.HelpBar = wx.StatusBar(id=ID_OBJDICTEDITHELPBAR, name='HelpBar', parent=self, style=wx.ST_SIZEGRIP) self._init_coll_HelpBar_Fields(self.HelpBar) self.SetStatusBar(self.HelpBar)
Example #3
Source File: recipe-577951.py From code with MIT License | 6 votes |
def DoGetBestSize(self): """ Overridden base class virtual. Determines the best size of the button based on the label and bezel size. """ label = self.GetLabel() if not label: return wx.Size(32, 32) dc = wx.ClientDC(self) dc.SetFont(self.GetFont()) retWidth, retHeight = dc.GetTextExtent(label) width = int(max(retWidth, retHeight) * 1.5) return wx.Size(width, width)
Example #4
Source File: recipe-580623.py From code with MIT License | 6 votes |
def PicRefresh(seite): i_seite = getint(seite) i_seite = max(1, i_seite) # ensure page# is within boundaries i_seite = min(PDFcfg.seiten, i_seite) dlg.zuSeite.Value = str(i_seite) # set page number in dialog fields if PDFcfg.oldpage == i_seite: return PDFcfg.oldpage = i_seite bmp = pdf_show(i_seite) dlg.PDFbild.SetSize(bmp.Size) dlg.PDFbild.SetBitmap(bmp) dlg.PDFbild.Refresh(True) bmp = None dlg.Layout() #============================================================================== # Disable OK button #==============================================================================
Example #5
Source File: objdictedit.py From CANFestivino with GNU Lesser General Public License v2.1 | 6 votes |
def OnHelpCANFestivalMenu(self, event): #self.OpenHtmlFrame("CAN Festival Reference", os.path.join(ScriptDirectory, "doc/canfestival.html"), wx.Size(1000, 600)) if wx.Platform == '__WXMSW__': readerpath = get_acroversion() readerexepath = os.path.join(readerpath,"AcroRd32.exe") if(os.path.isfile(readerexepath)): os.spawnl(os.P_DETACH, readerexepath, "AcroRd32.exe", '"%s"'%os.path.join(ScriptDirectory, "doc","manual_en.pdf")) else: message = wx.MessageDialog(self, _("Check if Acrobat Reader is correctly installed on your computer"), _("ERROR"), wx.OK|wx.ICON_ERROR) message.ShowModal() message.Destroy() else: try: os.system("xpdf -remote CANFESTIVAL %s %d &"%(os.path.join(ScriptDirectory, "doc/manual_en.pdf"),16)) except: message = wx.MessageDialog(self, _("Check if xpdf is correctly installed on your computer"), _("ERROR"), wx.OK|wx.ICON_ERROR) message.ShowModal() message.Destroy()
Example #6
Source File: daily.py From Bruno with MIT License | 6 votes |
def __init__(self): wx.Frame.__init__(self, None, pos=wx.DefaultPosition, size=wx.Size(450, 100), style=wx.MINIMIZE_BOX | wx.SYSTEM_MENU | wx.CAPTION | wx.CLOSE_BOX | wx.CLIP_CHILDREN, title="BRUNO") panel = wx.Panel(self) ico = wx.Icon('boy.ico', wx.BITMAP_TYPE_ICO) self.SetIcon(ico) my_sizer = wx.BoxSizer(wx.VERTICAL) lbl = wx.StaticText(panel, label="Bienvenido Sir. How can I help you?") my_sizer.Add(lbl, 0, wx.ALL, 5) self.txt = wx.TextCtrl(panel, style=wx.TE_PROCESS_ENTER, size=(400, 30)) self.txt.SetFocus() self.txt.Bind(wx.EVT_TEXT_ENTER, self.OnEnter) my_sizer.Add(self.txt, 0, wx.ALL, 5) panel.SetSizer(my_sizer) self.Show() speak.Speak('''Welcome back Sir, Broono at your service.''')
Example #7
Source File: sct_plugin.py From spinalcordtoolbox with MIT License | 5 votes |
def __init__(self, sctpanel, label=""): """ :param sctpanel: SCTPanel Class :param label: Label to display on the button """ # TODO: instead of this hard-coded 1000 value, extended the text box towards the most right part of the panel # (include a margin) self.textctrl = wx.TextCtrl(sctpanel, -1, "", wx.DefaultPosition, wx.Size(1000, 10)) hbox = wx.BoxSizer(wx.HORIZONTAL) button_fetch_file = wx.Button(sctpanel, -1, label=label) button_fetch_file.Bind(wx.EVT_BUTTON, self.get_highlighted_file_name) hbox.Add(button_fetch_file, proportion=0, flag=wx.ALIGN_LEFT | wx.ALL, border=5) hbox.Add(self.textctrl, 1, wx.EXPAND | wx.ALIGN_LEFT | wx.ALL, 5) self.hbox = hbox
Example #8
Source File: app.py From thotkeeper with BSD 2-Clause "Simplified" License | 5 votes |
def Read(self): """(Re-)read the stored configuration, applying settings atop the default collection of values.""" self._SetDefaults() conf = wx.Config(style=wx.CONFIG_USE_LOCAL_FILE) self.font_face = conf.Read(self.CONF_FONT_NAME, self.font_face) self.font_size = conf.ReadInt(self.CONF_FONT_SIZE, self.font_size) if conf.Exists(self.CONF_DATA_FILE): self.data_file = conf.Read(self.CONF_DATA_FILE) if conf.Exists(self.CONF_POSITION): position = conf.Read(self.CONF_POSITION).split(',') self.position = wx.Point(int(position[0]), int(position[1])) if conf.Exists(self.CONF_SIZE): size = conf.Read(self.CONF_SIZE).split(',') self.size = wx.Size(int(size[0]), int(size[1]))
Example #9
Source File: dialog_base.py From InteractiveHtmlBom with MIT License | 5 votes |
def __init__( self, parent ): wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = u"InteractiveHtmlBom", pos = wx.DefaultPosition, size = wx.Size( 463,497 ), style = wx.DEFAULT_DIALOG_STYLE|wx.STAY_ON_TOP|wx.BORDER_DEFAULT ) self.SetSizeHints( wx.DefaultSize, wx.DefaultSize ) self.Centre( wx.BOTH )
Example #10
Source File: bomsaway.py From Boms-Away with GNU General Public License v3.0 | 5 votes |
def __init__(self, parent, id, title): super(MainFrame, self).__init__(parent, id, title, wx.DefaultPosition, wx.Size(800, 600)) self._load_config() self._create_menu() self._do_layout() self.Centre() self._reset() self.ds = datastore.Datastore(self.datastore_file)
Example #11
Source File: dialog_base.py From InteractiveHtmlBom with MIT License | 5 votes |
def __init__( self, parent, id = wx.ID_ANY, pos = wx.DefaultPosition, size = wx.Size( 400,300 ), style = wx.TAB_TRAVERSAL, name = wx.EmptyString ): wx.Panel.__init__ ( self, parent, id = id, pos = pos, size = size, style = style, name = name ) bSizer20 = wx.BoxSizer( wx.VERTICAL ) self.notebook = wx.Notebook( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.NB_TOP|wx.BORDER_DEFAULT ) bSizer20.Add( self.notebook, 1, wx.EXPAND |wx.ALL, 5 ) bSizer39 = wx.BoxSizer( wx.HORIZONTAL ) self.m_button41 = wx.Button( self, wx.ID_ANY, u"Save current settings", wx.DefaultPosition, wx.DefaultSize, 0|wx.BORDER_DEFAULT ) bSizer39.Add( self.m_button41, 0, wx.ALL, 5 ) bSizer39.Add( ( 50, 0), 0, wx.EXPAND, 5 ) self.m_button42 = wx.Button( self, wx.ID_ANY, u"Generate BOM", wx.DefaultPosition, wx.DefaultSize, 0|wx.BORDER_DEFAULT ) self.m_button42.SetDefault() bSizer39.Add( self.m_button42, 0, wx.ALL, 5 ) self.m_button43 = wx.Button( self, wx.ID_CANCEL, u"Cancel", wx.DefaultPosition, wx.DefaultSize, 0|wx.BORDER_DEFAULT ) bSizer39.Add( self.m_button43, 0, wx.ALL, 5 ) bSizer20.Add( bSizer39, 0, wx.ALIGN_CENTER, 5 ) self.SetSizer( bSizer20 ) self.Layout() # Connect Events self.m_button41.Bind( wx.EVT_BUTTON, self.OnSaveSettings ) self.m_button42.Bind( wx.EVT_BUTTON, self.OnGenerateBom ) self.m_button43.Bind( wx.EVT_BUTTON, self.OnExit )
Example #12
Source File: app.py From thotkeeper with BSD 2-Clause "Simplified" License | 5 votes |
def _SetDefaults(self): """Set the configuration variables to their default values.""" self.font_face = 'Comic Sans MS' self.font_size = 12 self.data_file = None self.position = None self.size = wx.Size(600, 400)
Example #13
Source File: guicontrols.py From wfuzz with GNU General Public License v2.0 | 5 votes |
def CreateNotebook(self): bookStyle = aui.AUI_NB_DEFAULT_STYLE # bookStyle &= ~(aui.AUI_NB_CLOSE_ON_ACTIVE_TAB) bookStyle = aui.AUI_NB_DEFAULT_STYLE | aui.AUI_NB_TAB_EXTERNAL_MOVE | wx.NO_BORDER client_size = self.GetClientSize() nb = aui.AuiNotebook(self, -1, wx.Point(client_size.x, client_size.y), wx.Size(430, 200), agwStyle=bookStyle) nb.AddPage(ListPanel(self, self, self.controller._model, self.controller._interp), "Main") return nb
Example #14
Source File: widgets.py From youtube-dl-gui with The Unlicense | 5 votes |
def GetAdjustedSize(self, min_width, pref_height, max_height): width, height = self.GetBestSize() if width < min_width: width = min_width if pref_height != -1: height = pref_height * self.__listbox.GetCount() + 5 if height > max_height: height = max_height return wx.Size(width, height)
Example #15
Source File: backend_wx.py From ImageFusion with MIT License | 5 votes |
def get_wx_font(self, s, prop): """ Return a wx font. Cache instances in a font dictionary for efficiency """ DEBUG_MSG("get_wx_font()", 1, self) key = hash(prop) fontprop = prop fontname = fontprop.get_name() font = self.fontd.get(key) if font is not None: return font # Allow use of platform independent and dependent font names wxFontname = self.fontnames.get(fontname, wx.ROMAN) wxFacename = '' # Empty => wxPython chooses based on wx_fontname # Font colour is determined by the active wx.Pen # TODO: It may be wise to cache font information size = self.points_to_pixels(fontprop.get_size_in_points()) font =wx.Font(int(size+0.5), # Size wxFontname, # 'Generic' name self.fontangles[fontprop.get_style()], # Angle self.fontweights[fontprop.get_weight()], # Weight False, # Underline wxFacename) # Platform font name # cache the font and gc and return it self.fontd[key] = font return font
Example #16
Source File: backend_wx.py From ImageFusion with MIT License | 5 votes |
def resize(self, width, height): 'Set the canvas size in pixels' self.canvas.SetInitialSize(wx.Size(width, height)) self.window.GetSizer().Fit(self.window) # Identifiers for toolbar controls - images_wx contains bitmaps for the images # used in the controls. wxWindows does not provide any stock images, so I've # 'stolen' those from GTK2, and transformed them into the appropriate format. #import images_wx
Example #17
Source File: wxwrap.py From grass-tangible-landscape with GNU General Public License v2.0 | 5 votes |
def __init__(self, *args, **kwargs): if gtk3: if 'size' in kwargs: kwargs['size'] = wx.Size(max(self.gtk3MinSize, kwargs['size'][0]), kwargs['size'][1]) else: kwargs['size'] = wx.Size(self.gtk3MinSize, -1) wx.SpinCtrl.__init__(self, *args, **kwargs)
Example #18
Source File: objdictedit.py From CANFestivino with GNU Lesser General Public License v2.1 | 5 votes |
def _init_ctrls(self, prnt): wx.Frame.__init__(self, id=ID_HTMLFRAME, name='HtmlFrame', parent=prnt, pos=wx.Point(320, 231), size=wx.Size(853, 616), style=wx.DEFAULT_FRAME_STYLE, title='') self.Bind(wx.EVT_CLOSE, self.OnCloseFrame) self.HtmlContent = UrlClickHtmlWindow(id=ID_HTMLFRAMEHTMLCONTENT, name='HtmlContent', parent=self, pos=wx.Point(0, 0), size=wx.Size(-1, -1), style=wx.html.HW_SCROLLBAR_AUTO|wx.html.HW_NO_SELECTION) self.HtmlContent.Bind(HtmlWindowUrlClick, self.OnLinkClick)
Example #19
Source File: guicontrols.py From wfuzz with GNU General Public License v2.0 | 5 votes |
def start_gui(self, controller): self.controller = controller # tell FrameManager to manage this frame self._mgr = wx.aui.AuiManager() self._mgr.SetManagedWindow(self) # create menu mb = wx.MenuBar() file_menu = wx.Menu() file_menu.Append(wx.ID_EXIT, "Exit") help_menu = wx.Menu() help_menu.Append(ID_About, "About...") mb.Append(file_menu, "File") mb.Append(help_menu, "Help") self.SetMenuBar(mb) self.SetMinSize(wx.Size(400, 300)) # create some center panes self._mgr.AddPane(MainNotebookPanel(self, self, controller._interp), wx.aui.AuiPaneInfo().Caption("Raw HTTP Content").Name("analysis_notebook").CenterPane()) self._mgr.AddPane(self.CreateNotebook(), wx.aui.AuiPaneInfo().Name("main_notebook").CenterPane()) self._mgr.Update() self.Bind(wx.EVT_CLOSE, self.OnClose) self.Bind(wx.EVT_MENU, self.OnExit, id=wx.ID_EXIT) self.Bind(wx.EVT_MENU, self.OnAbout, id=ID_About) pub.subscribe(self.OnAddTab, "create_tab")
Example #20
Source File: loginScreen.py From HH---POS-Accounting-and-ERP-Software with MIT License | 5 votes |
def __init__( self, parent ): wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = u"POS and Accounting", pos = wx.DefaultPosition, size = wx.Size( 676,460 ), style = wx.DEFAULT_FRAME_STYLE|wx.MAXIMIZE|wx.TAB_TRAVERSAL ) self.SetSizeHints( wx.DefaultSize, wx.DefaultSize ) bSizer1 = wx.BoxSizer( wx.VERTICAL ) self.panel = wx.Panel( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL ) self.mainSizer = wx.BoxSizer( wx.VERTICAL ) self.userName = wx.TextCtrl (self.panel, value="admin") self.mainSizer.Add( self.userName, 0, wx.ALIGN_CENTRE|wx.ALL, 5 ) self.passwd = wx.TextCtrl (self.panel, value="admin") self.mainSizer.Add( self.passwd, 0, wx.ALIGN_CENTRE|wx.ALL, 5 ) self.lgnButton = wx.Button(self.panel, label="Login") self.mainSizer.Add( self.lgnButton, 0, wx.ALIGN_CENTRE|wx.ALL, 5 ) self.panel.SetSizer( self.mainSizer ) bSizer1.Add( self.panel, 1, wx.EXPAND |wx.ALL, 5 ) self.SetSizer( bSizer1 ) self.Layout() self.Centre( wx.BOTH ) self.lgnButton.Bind(wx.EVT_BUTTON, self.attemptLogin)
Example #21
Source File: sct_plugin.py From spinalcordtoolbox with MIT License | 5 votes |
def __init__(self, parent): wx.Dialog.__init__(self, parent, title="SCT Error") self.SetSize((510, 170)) vbox = wx.BoxSizer(wx.VERTICAL) lbldesc = wx.StaticText(self, id=-1, label="An error has occurred while running SCT. Please go to the Terminal, copy all " "the content and paste it as a new issue in SCT's forum: \n" "http://forum.spinalcordmri.org/", size=wx.Size(470, 60), style=wx.ALIGN_LEFT) vbox.Add(lbldesc, 0, wx.ALIGN_LEFT | wx.ALL, 10) btns = self.CreateSeparatedButtonSizer(wx.OK) vbox.Add(btns, 0, wx.ALIGN_LEFT | wx.ALL, 5) hbox = wx.BoxSizer(wx.HORIZONTAL) save_ico = wx.ArtProvider.GetBitmap(wx.ART_ERROR, wx.ART_TOOLBAR, (50, 50)) img_info = wx.StaticBitmap(self, -1, save_ico, wx.DefaultPosition, (save_ico.GetWidth(), save_ico.GetHeight())) hbox.Add(img_info, 0, wx.ALL, 10) hbox.Add(vbox, 0, wx.ALL, 0) self.SetSizer(hbox) self.Centre() self.CenterOnParent()
Example #22
Source File: convertQuotation.py From HH---POS-Accounting-and-ERP-Software with MIT License | 5 votes |
def __init__(self, parent, iid): self.iid = iid wx.Dialog.__init__(self, parent, wx.ID_ANY, "Quotation "+self.iid, size= (650,320)) self.panel = wx.Panel(self,wx.ID_ANY) self.m_cartDV = wx.dataview.DataViewListCtrl( self.panel, wx.ID_ANY, (20,20), wx.Size( 600, 180 ), 0 ) self.m_cartDV.SetMinSize( wx.Size( -1,400 ) ) self.m_cartDV.AppendTextColumn('Name') self.m_cartDV.AppendTextColumn('Quantity') self.m_cartDV.AppendTextColumn('Price') self.m_cartDV.AppendTextColumn('Total Price') qry = 'select p.name, pq.quantity, pq.price from products p, productquotes pq, quotations q where p.id = pq.product and q.id = pq.quoteId and pq.quoteId = %s' % (iid) curs = conn.cursor() curs.execute(qry) r = curs.fetchone() while (1): if r is not None: self.m_cartDV.AppendItem([ r['name'], str(r['quantity']), str(r['price']), str(int(r['quantity']) * int(r['price'])) ]) r = curs.fetchone() else: break self.lblRecMoney = wx.StaticText(self.panel, label="Recieved Money", pos=(20,220)) self.recMoney = wx.TextCtrl(self.panel, value="", pos=(130,220), size=(90,-1), validator=numOnlyValidator()) self.convertButton =wx.Button(self.panel, label="Convert to Invoice", pos=(110,260)) self.closeButton =wx.Button(self.panel, label="Cancel", pos=(250,260)) self.convertButton.Bind(wx.EVT_BUTTON, self.convertToInvoice) #self.convertButton.Bind(wx.EVT_BUTTON, self.asd) self.closeButton.Bind(wx.EVT_BUTTON, self.OnQuit) self.Bind(wx.EVT_CLOSE, self.OnQuit) self.Show()
Example #23
Source File: recipe-577951.py From code with MIT License | 5 votes |
def SetInitialSize(self, size=None): """ Given the current font and bezel width settings, calculate and set a good size. :param `size`: an instance of `wx.Size`. """ if size is None: size = wx.DefaultSize wx.PyControl.SetInitialSize(self, size)
Example #24
Source File: PyDraw.py From advancedpython3 with GNU General Public License v3.0 | 5 votes |
def __init__(self, parent, pos, size): super().__init__(parent=parent, pos=pos, size=wx.Size(size, size))
Example #25
Source File: util.py From trelby with GNU General Public License v2.0 | 5 votes |
def setWH(ctrl, w = -1, h = -1): size = ctrl.GetClientSize() if w != -1: size.width = w if h != -1: size.height = h ctrl.SetMinSize(wx.Size(size.width, size.height)) ctrl.SetClientSizeWH(size.width, size.height) # wxMSW doesn't respect the control's min/max values at all, so we have to # implement this ourselves
Example #26
Source File: objdictedit.py From CANFestivino with GNU Lesser General Public License v2.1 | 5 votes |
def OnAboutMenu(self, event): self.OpenHtmlFrame(_("About CAN Festival"), os.path.join(ScriptDirectory, "doc/about.html"), wx.Size(500, 450))
Example #27
Source File: loginScreen.py From HH---POS-Accounting-and-ERP-Software with MIT License | 5 votes |
def __init__( self, parent ): wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = u"POS and Accounting", pos = wx.DefaultPosition, size = wx.Size( 676,460 ), style = wx.DEFAULT_FRAME_STYLE|wx.MAXIMIZE|wx.TAB_TRAVERSAL ) self.SetSizeHints( wx.DefaultSize, wx.DefaultSize ) bSizer1 = wx.BoxSizer( wx.VERTICAL ) self.panel = wx.Panel( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL ) self.mainSizer = wx.BoxSizer( wx.VERTICAL ) self.userName = wx.TextCtrl (self.panel, value="admin") self.mainSizer.Add( self.userName, 0, wx.ALIGN_CENTRE|wx.ALL, 5 ) self.passwd = wx.TextCtrl (self.panel, value="admin") self.mainSizer.Add( self.passwd, 0, wx.ALIGN_CENTRE|wx.ALL, 5 ) self.lgnButton = wx.Button(self.panel, label="Login") self.mainSizer.Add( self.lgnButton, 0, wx.ALIGN_CENTRE|wx.ALL, 5 ) self.panel.SetSizer( self.mainSizer ) bSizer1.Add( self.panel, 1, wx.EXPAND |wx.ALL, 5 ) self.SetSizer( bSizer1 ) self.Layout() self.Centre( wx.BOTH ) self.lgnButton.Bind(wx.EVT_BUTTON, self.attemptLogin)
Example #28
Source File: networkedit.py From CANFestivino with GNU Lesser General Public License v2.1 | 5 votes |
def _init_ctrls(self, prnt): # generated method, don't edit wx.Frame.__init__(self, id=ID_HTMLFRAME, name='HtmlFrame', parent=prnt, pos=wx.Point(320, 231), size=wx.Size(853, 616), style=wx.DEFAULT_FRAME_STYLE, title='') self.Bind(wx.EVT_CLOSE, self.OnCloseFrame) self.HtmlContent = UrlClickHtmlWindow(id=ID_HTMLFRAMEHTMLCONTENT, name='HtmlContent', parent=self, pos=wx.Point(0, 0), size=wx.Size(-1, -1), style=wx.html.HW_SCROLLBAR_AUTO|wx.html.HW_NO_SELECTION) self.HtmlContent.Bind(HtmlWindowUrlClick, self.OnLinkClick)
Example #29
Source File: networkedit.py From CANFestivino with GNU Lesser General Public License v2.1 | 5 votes |
def OnHelpCANFestivalMenu(self, event): #self.OpenHtmlFrame("CAN Festival Reference", os.path.join(ScriptDirectory, "doc/canfestival.html"), wx.Size(1000, 600)) if wx.Platform == '__WXMSW__': readerpath = get_acroversion() readerexepath = os.path.join(readerpath,"AcroRd32.exe") if(os.path.isfile(readerexepath)): os.spawnl(os.P_DETACH, readerexepath, "AcroRd32.exe", '"%s"'%os.path.join(ScriptDirectory, "doc","manual_en.pdf")) else: os.system("xpdf -remote CANFESTIVAL %s %d &"%(os.path.join(ScriptDirectory, "doc/manual_en.pdf"),16))
Example #30
Source File: networkedit.py From CANFestivino with GNU Lesser General Public License v2.1 | 5 votes |
def OnAboutMenu(self, event): self.OpenHtmlFrame(_("About CAN Festival"), os.path.join(ScriptDirectory, "doc/about.html"), wx.Size(500, 450))