![]() ![]() nfigure(state="disabled", borderwidth="0", text=" X ") InitialThreshold = tk.Entry(frame, textvariable=settingsList, width=10) InitialLabel = tk.Label(frame, text="Threshold when the line changes color:") ![]() RemoveButton = tk.Button(frame, text="X", command=lambda i=index:self.removeLine(i, settingsList, frame))įont = tkFont.Font(font=removeButton) nfigure(state="disabled")ĭef expandCustomizationSettings(self, frame, settingsList): InnerLabel = tk.Label(frame, text="Color and threshold (when to change colors) for this line:")įont = tkFont.Font(font=innerLabel) Tk.Frame(self, highlightthickness="1", highlightbackground="dim gray", background="black").grid(row="1000", column="0", columnspan="3", sticky="we")ĭef addLineCustomizationSection(self, frame, text, checkboxValue, lineCheckbox, peakCheckbox, totalCheckbox, settingsList, m3Checkbox): Self.shipLabel = tk.Label(self.topFrame, text=shipTypeString, fg="white", background="black")įont = tkFont.Font(font=self.shipLabel) Tk.Frame(self.topFrame, background="black").grid(row="0", column="1", sticky="news") ![]() Self.pilotLabel = tk.Label(self.topFrame, text=pilot, fg="white", background="black")įont = tkFont.Font(font=self.pilotLabel) Self.topFrame = tk.Frame(self, background="black") nfig(tabs=tkFont.Font(font=text).measure(" "), wrap="none") Self._line_no.tag_configure("justify", justify="right") Self.tag_add("comment", match.start(), match.end()) Self._line_no.pack(side="left", fill="y") ![]() Self._line_no = tk.Text(self, width=4, yscrollcommand=self._text_scroll) Self._nfig(command=self._scrollbar_scroll) Self._text = tk.Text(self, width=90, yscrollcommand=self._text_scroll) # track: Track number of selected cell (Optional - default to reselect current =row) # clock: Clock (column) of selected cell (Optional - default to reselect current column) a圜anvas.create_text(0 * lumnWidth, PLAYHEAD_HEIGHT / 2, text="%d"%(lOffset), tags=("timetext"), anchor="w", fill=CELL_FOREGROUND) _text(idWidth - lectThickness, self.rowHeight * (self.rowHeight * int(row + 0.5)), state="hidden", tags=("lastpatterntext%d" % (row), "lastpatterntext"), font=font, anchor="e") _text((0, self.rowHeight * (row + 0.5)), text="Track %d" % (acks), font=font, fill=CELL_FOREGROUND, tags=("rowtitle%d" % (row),"trackname"), anchor="w") lumnWidth = idWidth / self.horizontalZoom I've done a little research and tried converting some TCL code, but none of it works.Font = tkFont.Font(family=zynthian_gui_config.font_topbar, size=self.fontsize) I'm probably just being a little stupid, but I can't find any way to fix this. Here's what I have for a normal Tkinter button: boldFont = Font (size = 10, weight = "bold")īoldButton = Button (formatBar, text = "B", width = 2, font = boldFont)īoldButton.pack (side = LEFT, padx = 1, pady = 1)Īnd that achieves what I would like, but when I try the same thing with a TTK button (using a TTK style instead of a font), it doesn't make the text bold.īnfigure ("Bold.TButton", size = 10, weight = "bold")īoldButton = ttk.Button (formatBar, text = "B", width = 2, style = "Bold.TButton") It is very easy to do with a normal Tkinter button, but I'm having a little trouble with a TTK one. What I'm trying to do is to make the font of a TTK button bold. First of all, thank you for taking the time to look at and read my question. ![]()
0 Comments
Leave a Reply. |