473,545 Members | 2,688 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Changing state of buttons.

Hi all,

I'm just learning Python (I'm about 8 hours in so far), and I have a
problem. I'm writing a small Windows app using Tkinter. I have two
buttons on my screen that I want to start in an inactive state
(already have that working) and when two input fields have some data
input, the buttons would become active. What's the best way to go
about changing the state of buttons that already exist?

Thanks!
Jul 18 '05 #1
1 1665
Eric Brunel <er*********@de spammed.com> wrote in message news:<ch******* ***@news-reader4.wanadoo .fr>...
I'm not sure I understand the meaning of your question: if it's really about
changing the state of an existing widget, a simple
widget.configur e(state=NORMAL) will do what you want.


Thanks, Eric. That's just what I was after. I'm thinking that this
may be easier if I use wxPython. I've been checking it out this
morning.

Thanks again!

Jamey
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4743
by: Calan | last post by:
I have a form with some picture boxes as buttons. I'm setting the picture property to a gif file for "normal", and to a different gif for the "pressed" state. This works fine. I get into trouble with the fact that the gif files have a transperent region in the middle (the button icon) that lets the back color of the picture box show through....
6
4067
by: TheKeith | last post by:
I am doing a form for my site and would like to enable and disable a radio button set depending on whether one of the choices on an outer radio button set is checked. How can I refer to all the inputs of the inner radio button set (they all share a common name) with javascript. I tried document.getElementsByNames('thename') but it doesn't...
5
1657
by: martin | last post by:
I needed a way to display calculated, multiple, changing values (numerical sums) as users interacted with the page, and do this without going back to the server to load the page again. What I finally settled on was <input type=button...> without an "onClick" attribute (because the purpose of the buttons was only for displaying values). ...
1
4090
by: Firewalker | last post by:
I am attempting to change the backColor property on the previously instantiated buttons FROM a listbox_doubleClick event. I thought it would be something like this: If Me.Controls.Item(iSeatNumber).BackColor.Equals(Color.White) Then Me.Controls.Item(iSeatNumber).BackColor.Equals(Color.CornflowerBlue) 'End If
2
1333
by: thomas.lidebrandt | last post by:
Hello I'm using wxPython to consruct a GUI and want to change a button label and event handler to change after the button have been pressed. The only thing I can think of is a global variable that contrls the state of the program and constructs the button in accordance to the defined state. Is there a better solution to this problem? ...
0
2088
by: Homer J. Simpson | last post by:
A few weeks ago I asked for suggestions on how to persist a tree's node state to cookies, without causing postbacks on each click in the tree. I had a single .aspx file, with a row of buttons on top of the screen, and a tree control below (with EnableViewState set to true). I let the user expand/collapse away to his hearts content without...
4
1081
by: _Who | last post by:
I have a master containing radio buttons all with the same group name. If I select one of the buttons and then navigate to a different page the buttons revert to their initial state. Is that what you'd expect? How can I make the state persist?
2
2176
by: test | last post by:
I have asked a sortlike question on this group, but this is an other approach for this problem. I want to send information about a set of 8 radiobuttons to a device that listens to TCP/IP on port 80. I have 8 sets of radiobuttons, each has a on and off state. When this form is send, I would like that the state of the buttons is converted...
0
7499
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7432
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7786
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6022
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5359
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5076
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1919
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1044
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.