Python Forum
[Tkinter] Tkinter Font Color
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] Tkinter Font Color
#11
mystr = StringVar()
# then you need to use textvariable=mystr in widget T
# to change content of mystr:
mystr.set(value)
Reply
#12
(Mar-27-2018, 10:52 AM)Larz60+ Wrote:
mystr = StringVar()
# then you need to use textvariable=mystr in widget T
# to change content of mystr:
mystr.set(value)

i might be in way over my head but now im working on a live graph. the values im trying to load into the graph are going to be exactly like this,


1.0 16:08"PM" *03-27-18
2.5 16:08"PM" *03-27-18
11.5 16:08"PM" *03-27-18
etc,
but never
111.55 16:08"PM" *03-27-18

im trying to figure out how to get the graph to load the value. im working from a segment of code from a live graph tutorial and it works if i format the numebrs like this,

1,2
2,3
3,6
4,9

the chuck of code that is handles this im not sure how it works. heres the code i think handles this but im not sure what to do for this to work.

f = Figure(figsize=(5,5), dpi=100)
a = f.add_subplot(111)


def animate(i):
    pullData = open("sampleText.txt","r").read()
    dataList = pullData.split('\n')
    xList = []
    yList = []
    

    for eachLine in dataList:
        if len(eachLine) > 1:
            x, y = eachLine.split(',',1)
            xList.append(int(x))
            yList.append(int(y))
            
    a.clear()
    a.plot(xList, yList)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Tkinter - How can I change the default Notebook border color? TurboC 5 14,751 May-23-2022, 03:44 PM
Last Post: bigmac
  Can't get tkinter button to change color based on changes in data dford 4 3,413 Feb-13-2022, 01:57 PM
Last Post: dford
  [Tkinter] Trouble changing Font within tkinter frame title AnotherSam 1 4,117 Sep-30-2021, 05:57 PM
Last Post: menator01
Question [Tkinter] Can I set background color for each item in tkinter Combobox? water 1 5,117 Dec-10-2020, 07:48 PM
Last Post: Larz60+
  Tkinter menu font size -method to change tonycat 2 7,828 Oct-11-2020, 02:43 AM
Last Post: tonycat
  tkinter | Button color text on Click Maryan 2 3,361 Oct-09-2020, 08:56 PM
Last Post: Maryan
  [Tkinter] How to Print a list = ['a','b','c'], using tkinter along with a custom font? Pleiades 2 2,357 Sep-15-2020, 03:54 PM
Last Post: Pleiades
  [tkinter] color change for hovering over button teacher 4 8,477 Jul-04-2020, 06:33 AM
Last Post: teacher
  TKINTER - Change font color for night or day Ayckinn 2 3,863 May-24-2020, 09:25 PM
Last Post: Ayckinn
  Tkinter help (color) Florent 2 2,322 Mar-01-2020, 02:59 PM
Last Post: Florent

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020