473,856 Members | 1,392 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

event binding and component.confi g

I'm experiencing what seems to be strange behaviour. I don't know if
it's Pmw, Tkinter on Python. I have a button, defined in a
Pmw.buttonbox, that I would like to configure to "sunken" after it has
been clicked/released. Using the example style coding:

self.buttonBox1 .add('Add', command = self.addCalenda r)

the button remains "sunken". If I bind the event:

self.buttonBox1 .add('Add')
self.buttonBox1 .component('Add ').bind('<Butto nRelease-1>',
self.addCalenda rBind)
self.buttonBox1 .component('Add ').bind('<KeyRe lease-Return>',
self.addCalenda rBind)

the button reverts to "raised". The addCalendar and addCalendarBind are
still essentially stub functions:

def addCalendarBind (self,event):
self.addCalenda r()

def addCalendar(sel f):
global prog_mode
self.clearCalen dar()
prog_mode = 'add'
self.buttonBox1 .component('Add ').config(relie f='sunken')
self.buttonBox1 .component('Com mit').config(re lief='raised')
self.buttonBox1 .component('Upd ate').config(re lief='flat')
self.buttonBox1 .component('Del ete').config(re lief='flat')
self.buttonBox1 .component('Que ry').config(rel ief='flat')

--
---------------------------------------------------------------------
Scott Holmes http://sholmes.ws
http://pages.sbcglobal.net/scottholmes
sc*********@sbc global.net

Independent Programmer/Analyst Passport 4GL
PHP HTML Composer PostgreSQL Informix 4GL, SQL
---------------------------------------------------------------------
There are more things in heaven and earth, Horatio,
than are dreamt of in your philosophy
---------------------------------------------------------------------
Jul 18 '05 #1
1 1562
If you want something that allows a user to select a particular mode
and then to display that mode until it is changed - use
Pmw.RadioButton instead of trying to hack Pmw.ButtonBox. I think this
will do exactly what you want.

Greg

Scott Holmes <sc*********@sb cglobal.net> wrote in message news:<ma******* *************** ***********@pyt hon.org>...
I'm experiencing what seems to be strange behaviour. I don't know if
it's Pmw, Tkinter on Python. I have a button, defined in a
Pmw.buttonbox, that I would like to configure to "sunken" after it has
been clicked/released. Using the example style coding:

self.buttonBox1 .add('Add', command = self.addCalenda r)

the button remains "sunken". If I bind the event:

self.buttonBox1 .add('Add')
self.buttonBox1 .component('Add ').bind('<Butto nRelease-1>',
self.addCalenda rBind)
self.buttonBox1 .component('Add ').bind('<KeyRe lease-Return>',
self.addCalenda rBind)

the button reverts to "raised". The addCalendar and addCalendarBind are
still essentially stub functions:

def addCalendarBind (self,event):
self.addCalenda r()

def addCalendar(sel f):
global prog_mode
self.clearCalen dar()
prog_mode = 'add'
self.buttonBox1 .component('Add ').config(relie f='sunken')
self.buttonBox1 .component('Com mit').config(re lief='raised')
self.buttonBox1 .component('Upd ate').config(re lief='flat')
self.buttonBox1 .component('Del ete').config(re lief='flat')
self.buttonBox1 .component('Que ry').config(rel ief='flat')

--
---------------------------------------------------------------------
Scott Holmes http://sholmes.ws
http://pages.sbcglobal.net/scottholmes
sc*********@sbc global.net

Independent Programmer/Analyst Passport 4GL
PHP HTML Composer PostgreSQL Informix 4GL, SQL
---------------------------------------------------------------------
There are more things in heaven and earth, Horatio,
than are dreamt of in your philosophy
---------------------------------------------------------------------

Jul 18 '05 #2

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

Similar topics

1
2873
by: Notlwonk | last post by:
Not sure where to post this Q I am trying to write a Managed Exchange Server Event Sink (as a class library) in C# I have been following this tutorial step-by-step http://www.codeproject.com/csharp/CsManagedEventSinksHooks.as So far so good....except when it comes down to binding the component to the folder on the Exchange Store. When I do...I get the following error
0
1308
by: Henrik_the_boss | last post by:
Hello all. I have a couple of aspx pages. When something fails in them, I would like them to be able to log to either a database, a logfile, or the application log. All code is in C# I run into permissions problems straigh away though. To log to the event log, you need Administrator privileges. So followed MS example how to sandbox sensitive and secure code.
9
1628
by: Ollie | last post by:
okay sorry for cross posting but want to see if any one can explain the solution to this problem for me: I have a .Net ASP.Net app written in C# that use COM+ components to do some business processing...... When I have the ASP.Net website and the COM+ components installed on the same machine (i.e everything local) it all works fine, and it can write to the event log....
0
1458
by: Ian | last post by:
I have sub-classed the Page class in order to provide some base properties and methods that every page on my site will need access to. I would like to have these things show up in the Simple Binding window of the DataBindings dialog. I then found this site (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vxurfDataBindingsDialogBox.asp) which says: The tree view displays these objects: the Page object; any...
0
4813
by: JSantora | last post by:
Essentially, InsertAT is broken! For the past couple of hours, I've been getting this "Parameter name: '-2147483550' is not a valid value for 'index'." error. Apparently, its caused by having manually inserted a row in the table bound to the Combo box. The InsertAt Method of adding a row just does not work. Hope this helps anyone with this problem. john
5
19542
by: kimtherkelsen | last post by:
Hi, I have made some software that uses one of the COM ports to communicate with an external device. The software is written in C# and uses the new SerialPort class in .Net 2.0. It works perfectly when I use the COM ports that are integrated in my PC. It also works if I use a COM->RS232 converter as long as I don't unplug the converter when the software is running. If I unplug the converter I get a .Net runtime 2.0 error:...
7
5147
by: Don | last post by:
Getting errors after following the MSDN article on using VB.NET (and VS2005) for "Implementing a Managed OnSave Event Sink" for Exchange Server 2007. Not sure, but part of the problem may be that it's the 64-bit version of Exchange 2007 installed on Windows Server 2003 Enterprise x64, while the Exchange 2007 SDK samples seem mostly geared toward 32-bit. Even at that, I was able to build the TLB and install it into COM+ Component Services,...
7
1870
by: Georg Grabler | last post by:
Hello everybody. There's a C library which i'd like to have python bindings for. I havn't known anything before about how to write python bindings for a C library. I succeeded now by using distutils to write the first bindings for functions and similar. Now, it seems as something is blocking my brain. For the library, i need "custom" types, so types defined in this library (structures),
0
994
by: swellfr | last post by:
Hi, I have a component that i can only access through late binding. This is working fine , i can use all the exposed methods , but i can't register (/don't know how to ) event handlers for this component. Is there someone that knows how to do it or who can spot me a example. Thx
0
9923
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9767
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11069
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10392
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9539
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7937
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7101
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5965
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3206
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.