MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / DirSelectBox

Class DirSelectBox

tools/sconsui.py:109–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107 executor.start()
108
109class DirSelectBox(ttk.Frame):
110 def __init__(self, master=None, **kw):
111 ttk.Frame.__init__(self, master, **kw)
112 self.dir_var = StringVar()
113 self.entry = ttk.Entry(self, textvariable = self.dir_var)
114 self.entry.pack(fill=BOTH, expand=1,side=LEFT)
115 self.entry.configure(width = 50)
116
117 self.browser_button = ttk.Button(self, text="Browser", command=self.browser)
118 self.browser_button.pack(side=RIGHT)
119
120 def browser(self):
121 dir = tkFileDialog.askdirectory(parent=self, title='Open directory', initialdir=self.dir_var.get())
122 if dir != '':
123 self.dir_var.set(dir)
124
125 def set_path(self, path):
126 path = path.replace('\\', '/')
127 self.dir_var.set(path)
128
129 def get_path(self):
130 return self.dir_var.get()
131
132COMPILER = [
133 ("GNU GCC", "GCC"),

Callers 1

setup_setting_uiMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected