if (id == GUIActivator.id) and state:
if id == GUIActivator.id:
def __del__(self):
PtUnloadDialog(kGUIName)
Could you try PtGetControlEvents(true, self.key) and PtGetControlEvents(false, self.key) instead of PtEnableControlKeyEvents(self.key) and PtDisableControlKeyEvents(self.key)
And it might be a good idea to unload the dialog finally in the destructor
Could be that calling it twice causes problems.
if (id == GUIActivator.id) and state:
you can try to make always a debug print when the def OnControlKeyEvent is executed
def OnControlKeyEvent(self, controlKey, activeFlag):
print 'CONTROL KEY PRESSED'
if (controlKey == PlasmaControlKeys.kKeyExitMode):
print 'CONTROL KEY ESCAPE PRESSED'
self.ICloseGUI()
elif ((controlKey == PlasmaControlKeys.kKeyMoveBackward) or ((controlKey == PlasmaControlKeys.kKeyRotateLeft) or (controlKey == PlasmaControlKeys.kKeyRotateRight))):
print 'CONTROL KEY ARROW PRESSED'
self.ICloseGUI()
TheMagician wrote:When you use
- Code: Select all
if (id == GUIActivator.id) and state:
which state is actually detected? Mouse down or mouse up?
In user interface design, a modal window is a child window that requires users to interact with it before they can return to operating the parent application, thus preventing the workflow on the application main window. Modal windows are often called heavy windows or modal dialogs because the window is often used to display a dialog box.
Modal windows are commonly used in GUI systems to command user awareness and to display emergency states. On the Web, they are often used to show images in detail.[1]
Users browsing this forum: No registered users and 6 guests