View Single Post
  #11  
Old 14th October 2020, 01:44 PM
chook chook is offline
Member
 
Join Date: Jan 2019
Posts: 14
Default

i hope this gets pasted properly
####### add row number
rowo = 0
for Venue in Venues:
Rtype = Venue["raceType"]
Mname = Venue["meetingName"]
Location = Venue["location"]
###### weather and track condition might not be there
if "weatherCondition" in Venue: Wcondition = Venue["weatherCondition"]
else: Wcondition = "BLEEK"
if "trackCondition" in Venue: Tcondition = Venue["trackCondition"]
else: Tcondition = "TkCoon"
states = ("VIC","NSW","QLD","SA","WA","TAS","ACT")
if Rtype == "R" and Location in states:
#Race Info
Mname_label = Label(Rinfo, text=Mname, font=("bold", 12), width=15, anchor=W, bg="Red")
Mname_label.grid(column=0, sticky=W,row=rowo)
Location_label = Label(Rinfo, text=Location, font=("bold", 12), width=5 ,anchor=W, bg="Pink")
Location_label.grid(column=2, sticky=W,row=rowo)
Tcondition_label = Label(Rinfo, text=Tcondition, font=("bold", 12), width=10 ,anchor=W, bg="Magenta")
Tcondition_label.grid(column=3, sticky=W,row=rowo)
Wcondition_label = Label(Rinfo, text=Wcondition, font=("bold", 12), width=10 ,anchor=W, bg="Lightblue")
Wcondition_label.grid(column=4, sticky=W,row=rowo)
##### increment row number
rowo += 1

# Date Selection Frame

#### end of paste

HTH
Reply With Quote