File: minimalDialog.py

package info (click to toggle)
pythoncard 0.8.1-8.1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 5,352 kB
  • ctags: 4,594
  • sloc: python: 42,401; makefile: 55; sh: 22
file content (21 lines) | stat: -rw-r--r-- 534 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

"""
__version__ = "$Revision: 1.7 $"
__date__ = "$Date: 2004/08/12 19:18:51 $"
"""

from PythonCard import model

class MinimalDialog(model.CustomDialog):
    def __init__(self, parent, txt=''):
        model.CustomDialog.__init__(self, parent)
        
        # if some special setup is necessary, do it here
        self.components.field1.text = txt

def minimalDialog(parent, txt):
    dlg = MinimalDialog(parent, txt)
    result = dlg.showModal()
    result.text = dlg.components.field1.text
    dlg.destroy()
    return result