Bottom Page

Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Text after push button
#1
Hello All,
can after push button to see text on display- ,(bоttom) "please wait",for 30 secоnds,is it possible?
Thank you
Quote
#2
Yes its possible -- however without knowing the language application you wish to do it in no way of determining the how of it
metulburr likes this post
Quote
#3
with python and tkinter is it can?
Quote
#4
okay to help those who know tkinter what version of python are you using -- sometimes a big deal and sometimes not but specificity always helps
Quote
#5
Use the same methods as one of your previous questions.
https://python-forum.io/Thread-Tkinter-R...g-a-button
Quote
#6
(Jul-02-2019, 03:30 PM)Denni Wrote: okay to help those who know tkinter what version of python are you using -- sometimes a big deal and sometimes not but specificity always helps
Hello,python 3 is it.
good day
Quote
#7
(Jul-02-2019, 05:50 PM)Yoriz Wrote: Use the same methods as one of your previous questions.
https://python-forum.io/Thread-Tkinter-R...g-a-button
Hello ,but this is for progress bar,i want text bottom if can.
Thank you Yoriz
Quote
#8
Hello,
this is the code,normal is "this is ok"(on red bottom bar), i push button it start text "please wait"" but it dont want to return text "this is ok" where is wrong.
Thank you
import tkinter as tk
from tkinter import *
import smtplib
from tkinter import Tk, Toplevel, Button
import RPi.GPIO as GPIO
import time
import tkinter.ttk as ttk
from tkinter.ttk import Progressbar, Style, Button




master= Tk()

master1 =Toplevel()
master3 =Toplevel()


##################################right

master1.minsize(150,150+170+170)
master1.geometry("185x1000+0+0")
master1.configure(background="black",)
master1.title("2")
master1.overrideredirect(True)
#################################left


master3.minsize(900,0+0+0)
master3.geometry("100x80+180+920")
master3.configure(background="red",)
master3.title("КАФЕ АВТОМАТ 1")
master3.overrideredirect(True)
#################################


master3.label = tk.Label(master3, text='this is OK')
master3.label.pack()



def text_1_2():
    b2()
    nadpisok()
   ##########################

    
def nadpisok():
    print('Button clicked')
    master3.label['text'] = 'please wait'
    master3.button['state'] = 'disabled'
    master3.after(3000, master.delayed_textok)
   
    
def delayed_textok():
    master3.label['text'] = 'this is OK'
    master3.button['state'] = 'normal'
    master3.after(3000, master.finhished)

     


###########################################
GPIO.setwarnings(False)

   
#########################################
def b2():
        GPIO.setmode(GPIO.BCM)
        RELAIS_2_GPIO = 10
        GPIO.setup(RELAIS_2_GPIO, GPIO.OUT)
        GPIO.output(RELAIS_2_GPIO, GPIO.HIGH)
        time.sleep(0.35)
        GPIO.output(RELAIS_2_GPIO, GPIO.LOW)
        time.sleep(0.35)
#########################################


image2 = tk.PhotoImage(file="")
b = button = tk.Button(master1,image=image2, height=80, width=160,background="red",font="0",bd=10,fg="black",command= text_1_2)
b.place(x = 0, y = 120)
label2=Label(master1,text="",height=0, width=0,bg="#100C19",font="Times 13 underline",fg="white",relief="solid",bd=0).place(x=0,y=200)
#########################

master.mainloop()
GPIO.cleanup()


Quote
#9
the wrong:
Error:
master3.after(1000,master3.delayed_textok) AttributeError: 'Toplevel' object has no attribute 'delayed_textok'
Quote
#10
delayed_textok is a function not a method of master3
change
master3.after(1000,master3.delayed_textok)
to
master3.after(1000,delayed_textok)
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  How to make button text bold in Tkinter? scratchmyhead 2 126 May-16-2020, 02:53 AM
Last Post: scratchmyhead
  [Tkinter] Text Button - How Do I Reduce The Margin? vman44 6 229 Apr-27-2020, 10:48 PM
Last Post: Larz60+
  [PyQt] Push Button issue gvin47 8 237 Apr-18-2020, 05:39 PM
Last Post: deanhystad
  [PySimpleGui] How to alter mouse click button of a standard submit button? skyerosebud 3 864 Jul-21-2019, 06:02 PM
Last Post: FullOfHelp
  Windows GUI with push buttons to launch python scripts drifterf 7 636 Jul-17-2019, 05:34 PM
Last Post: Yoriz
  Can't change the colour of Tk button text Pilover 4 3,890 Feb-27-2019, 09:02 PM
Last Post: Pilover
  [PyQt] Close program using Push Button with the help of input from a Message Box bhargavbn 2 1,956 Oct-30-2018, 05:09 AM
Last Post: bhargavbn
  Set input text from button gio123 1 1,245 Mar-01-2018, 10:28 AM
Last Post: gio123
  [Tkinter] Selected radio button in push button in Tkinter prashantfunde91 1 7,822 Jun-22-2017, 05:27 PM
Last Post: DeaD_EyE
  [Tkinter] Problem with changing label text on button press xk2006x 1 3,474 Jun-02-2017, 06:00 PM
Last Post: nilamo

Forum Jump:


Users browsing this thread: 1 Guest(s)