def __init__(self, master, app): #CNCRibbon.ButtonGroup.__init__(self, master, N_("Config"), app) CNCRibbon.ButtonMenuGroup.__init__(self, master, N_("Config"), app, [(_("User File"), "about", app.showUserFile)]) self.grid3rows() # === col,row=0,0 f = Frame(self.frame) f.grid(row=row, column=col, columnspan=3, padx=0, pady=0, sticky=NSEW) b = Label(f, image=Utils.icons["globe"], background=Ribbon._BACKGROUND) b.pack(side=LEFT) self.language = Ribbon.LabelCombobox(f, command=self.languageChange, width=16) self.language.pack(side=RIGHT, fill=X, expand=YES) tkExtra.Balloon.set(self.language, _("Change program language restart is required")) self.addWidget(self.language) self.fillLanguage() # === row += 1 b = Ribbon.LabelRadiobutton(self.frame, image=Utils.icons["camera"], text=_("Camera"), compound=LEFT, anchor=W, variable=app.tools.active, value="Camera", background=Ribbon._BACKGROUND) b.grid(row=row, column=col, padx=1, pady=0, sticky=NSEW) tkExtra.Balloon.set(b, _("Camera Configuration")) self.addWidget(b) # --- row += 1 b = Ribbon.LabelRadiobutton(self.frame, image=Utils.icons["color"], text=_("Colors"), compound=LEFT, anchor=W, variable=app.tools.active, value="Color", background=Ribbon._BACKGROUND) b.grid(row=row, column=col, padx=1, pady=0, sticky=NSEW) tkExtra.Balloon.set(b, _("Color configuration")) self.addWidget(b) # === col,row = col+1,1 b = Ribbon.LabelRadiobutton(self.frame, image=Utils.icons["font"], text=_("Fonts"), compound=LEFT, anchor=W, variable=app.tools.active, value="Font", background=Ribbon._BACKGROUND) b.grid(row=row, column=col, padx=1, pady=0, sticky=NSEW) tkExtra.Balloon.set(b, _("Font configuration")) self.addWidget(b) # --- row += 1 b = Ribbon.LabelRadiobutton(self.frame, image=Utils.icons["config"], text=_("Machine"), compound=LEFT, anchor=W, variable=app.tools.active, value="CNC", background=Ribbon._BACKGROUND) b.grid(row=row, column=col, padx=1, pady=0, sticky=NSEW) tkExtra.Balloon.set(b, _("Machine configuration for bCNC")) self.addWidget(b) # === col,row = col+1,1 b = Ribbon.LabelRadiobutton(self.frame, image=Utils.icons["shortcut"], text=_("Shortcuts"), compound=LEFT, anchor=W, variable=app.tools.active, value="Shortcut", background=Ribbon._BACKGROUND) b.grid(row=row, column=col, padx=1, pady=0, sticky=NSEW) tkExtra.Balloon.set(b, _("Shortcuts")) self.addWidget(b)
def __init__(self, master, app): # CNCRibbon.ButtonGroup.__init__(self, master, N_("Config"), app) CNCRibbon.ButtonMenuGroup.__init__(self, master, N_("Config"), app) self.grid3rows() col, row = 0, 0 f = Tk.Frame(self.frame) f.grid(row=row, column=col, columnspan=3, padx=0, pady=0, sticky=Tk.NSEW) b = Tk.Label(f, image=OCV.icons["globe"], background=OCV.COLOR_BG) b.pack(side=Tk.LEFT) self.language = Ribbon.LabelCombobox(f, command=self.languageChange, width=16) self.language.pack(side=Tk.RIGHT, fill=Tk.X, expand=Tk.YES) tkExtra.Balloon.set(self.language, _("Change program language restart is required")) self.addWidget(self.language) self.fillLanguage() row += 1 b = Ribbon.LabelRadiobutton(self.frame, image=OCV.icons["camera"], text=_("Camera"), compound=Tk.LEFT, anchor=Tk.W, variable=OCV.TK_MAIN.tools.active, value="Camera", background=OCV.COLOR_BG) b.grid(row=row, column=col, padx=1, pady=0, sticky=Tk.NSEW) tkExtra.Balloon.set(b, _("Camera Configuration")) self.addWidget(b) row += 1 b = Ribbon.LabelRadiobutton(self.frame, image=OCV.icons["color"], text=_("Colors"), compound=Tk.LEFT, anchor=Tk.W, variable=OCV.TK_MAIN.tools.active, value="Color", background=OCV.COLOR_BG) b.grid(row=row, column=col, padx=1, pady=0, sticky=Tk.NSEW) tkExtra.Balloon.set(b, _("Color configuration")) self.addWidget(b) col, row = col + 1, 1 b = Ribbon.LabelRadiobutton(self.frame, image=OCV.icons["config"], text=_("Config"), compound=Tk.LEFT, anchor=Tk.W, variable=OCV.TK_MAIN.tools.active, value="CNC", background=OCV.COLOR_BG) b.grid(row=row, column=col, padx=1, pady=0, sticky=Tk.NSEW) tkExtra.Balloon.set(b, _("Machine configuration for OKKCNC")) self.addWidget(b) row += 1 b = Ribbon.LabelRadiobutton(self.frame, image=OCV.icons["arduino"], text=_("Controller"), compound=Tk.LEFT, anchor=Tk.W, variable=OCV.TK_MAIN.tools.active, value="Controller", background=OCV.COLOR_BG) b.grid(row=row, column=col, padx=1, pady=0, sticky=Tk.NSEW) tkExtra.Balloon.set(b, _("Controller (GRBL) configuration")) self.addWidget(b) col, row = col + 1, 1 b = Ribbon.LabelRadiobutton(self.frame, image=OCV.icons["font"], text=_("Fonts"), compound=Tk.LEFT, anchor=Tk.W, variable=OCV.TK_MAIN.tools.active, value="Font", background=OCV.COLOR_BG) b.grid(row=row, column=col, padx=1, pady=0, sticky=Tk.NSEW) tkExtra.Balloon.set(b, _("Font configuration")) self.addWidget(b) row += 1 b = Ribbon.LabelRadiobutton(self.frame, image=OCV.icons["shortcut"], text=_("Shortcuts"), compound=Tk.LEFT, anchor=Tk.W, variable=OCV.TK_MAIN.tools.active, value="Shortcut", background=OCV.COLOR_BG) b.grid(row=row, column=col, padx=1, pady=0, sticky=Tk.NSEW) tkExtra.Balloon.set(b, _("Shortcuts configuration")) self.addWidget(b)