strange geometry problem

N

Nick Buchholz

Hi all,
I'm doing a GUI for describing connectors and the signals attached. the system runs on
CentOS release 5.2 (FINAL) using python 2.5 and tcl/tk 8.4

I have a class Pin that contains two class attributes that are dialogs. They are built by a helper
routine as follows:
if type(Pin.clkDialog) == type(None):
Pin.clkDialog = bldTypeDlg(self.cnctr.gui.parent,
("Clock State Selector", "Choose a Default \nClock State\n\n\n\n"),
CLKVALUES, 0)
Pin.clkDialog.geometry('+%d+%d'%(400,400))
Pin.clkDialog.withdraw()

the second dialog is similar but with different strings passed in.
they are activated from one field of an instance variable dialog self.valDialog

The strange behavior is as follows:
The first time the class dialogs are activated they appear in front of but immediately go behind the
valDialog and are hidden. After moving the valDialog and using the class dialogs, subsequent activations
appear at a location that is effected by the geometry spec in the activate routine.

the activation code is
#####################################################################################
#####################################################################################
def getClkState(self, event):
Pin.clkDialog.geometry('+%d+%d'%(400,400))
rslt = Pin.clkDialog.tkraise()
resp = Pin.clkDialog.activate()

if resp == 'OK':
self.clkNominal = Pin.clkDialog.get()
self.entries[5].setentry(self.clkNominal)
self.valDisps[4].setentry( self.clkNominal )
else:
return "break"

#####################################################################################
#####################################################################################
def getLgcState(self, event):
Pin.lgcDialog.geometry('+%d+%d'%(400,400))
rslt = Pin.lgcDialog.tkraise()
resp = Pin.lgcDialog.activate()
if resp == 'OK':
self.lgcNominal = Pin.lgcDialog.get()
self.entries[5].setentry(self.lgcNominal)
self.valDisps[4].setentry( self.lgcNominal )
else:
return "break"

Any ideas on what's going on? and how to fix it?


Nick
(e-mail address removed)
Day phone: (520) 318-8203
"Time is an illusion, Lunchtime doubly so" - Ford Prefect
Time is an illusion perpetrated by the manufacturers of space.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top