[Tk] radiobutton vs button
  Home FAQ Contact Sign in
fr.comp.lang.python only
 
Advanced search
POPULAR GROUPS

more...

 Up
[Tk] radiobutton vs button         

Group: fr.comp.lang.python · Group Profile
Author: znort
Date: Oct 11, 2006 10:15

salut,
dans le programme (très complexe...) suivant,
j'utilise un radiobutton pour récupérer une valeur,
et esthétiquement, c'est moche !

y-a-t'il un moyen de récupérer le texte d'un Button ?

# !/usr/bin/python

from Tkinter import *
root=Tk()
var=StringVar()

def affich():
print var.get()

i=1
while(i<5):
rb=Radiobutton(root,text=i,value=i,variable=var,command=affich)
rb.pack()
i=i+1

root.mainloop()
2 Comments
diggit! del.icio.us! reddit!

RELATED THREADS
SubjectArticles qty Group
3 Button Simulation with 1 Button Mouse?comp.windows.x ·
I want idMso for "Mailing" Tab button to add this button in custom ribbon tabmicrosoft.public.word.docmanagement ·
Re: 4-button trackball, not picking up all buttonsalt.os.linux.debian ·