# if the click was in the Query or Search input box if not inputBox.isHidden() and (y >= inputY and y <= inputYmax and x >= inputX): # Get whatever the user enters into the textbox queryInput = inputBox.edit() #Display "results" resultsPane.reset() queryResults = db.executeQuery(queryInput) if queryResults != False: resultsPane.setResults(queryResults) else: resultsPane.setResults(["Error in query"]) resultsPane.showResults(resultsPane.getPageNum()) # Make the textbox clear when next clicked on inputBox.clear() # If the click is at the bottom of the Query or Seach screen elif y == curses.LINES - 1 and (inTab == "Query" or inTab == "Search"): if resultsPane.atNext(x): resultsPane.showResults(resultsPane.getPageNum() + 1) elif resultsPane.atPrev(x): resultsPane.showResults(resultsPane.getPageNum() - 1) elif inTab == "Help": for b in helpButtons: if b.itemAt(y, x): helpTab = b.itemAt(y, x) switchTab = True # Make sure to clean up whatever window mode we may have gotten into