-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathLinkUI.py
26 lines (24 loc) · 882 Bytes
/
LinkUI.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import wx
class LinkUI(wx.Dialog):
def __init__(self, parent, url):
self.parent=parent
wx.Dialog.__init__(self, parent, title="URL Ready", size=wx.DefaultSize) # initialize the wx frame
self.panel = wx.Panel(self)
self.main_box = wx.BoxSizer(wx.VERTICAL)
self.Bind(wx.EVT_CLOSE, self.OnClose)
self.link_label = wx.StaticText(self.panel, -1, "Audio &link")
self.link = wx.TextCtrl(self.panel, -1, "",style=wx.TE_READONLY)
self.link.SetValue(url)
self.main_box.Add(self.link, 0, wx.ALL, 10)
self.link.SetFocus()
self.close = wx.Button(self.panel, wx.ID_CANCEL, "&Cancel")
self.close.Bind(wx.EVT_BUTTON, self.OnClose)
self.main_box.Add(self.close, 0, wx.ALL, 10)
self.panel.Layout()
def OnClose(self, event):
# self.parent.Raise()
# self.parent.SetFocus()
self.Destroy()
def ShowLink(parent,url):
link = LinkUI(parent,url)
return link.ShowModal()