Logo Search packages:      
Sourcecode: pythoncard version File versions  Download package

def customDialogs::AutoTextScrollerDialog::buildSpeedReaderResource (   self,
  title,
  prefs 
)

This builds a string containing a resource description as you find in a .rsrc files

Definition at line 174 of file customDialogs.py.

00174                                                     :
        """This builds a string containing a resource description as you find in a .rsrc files"""

        # main StaticText whcih holds each word 
        bodyRSRC = " {'type':'StaticText', 'name':'theWords', 'position':(10,100)," + \
                  "'alignment':'center','font':" + self.font + ",'size':(520,110),'text':'-'},"

        # the buttons
        bodyRSRC = bodyRSRC + \
                  "{'type':'Button', 'name':'btnStart', 'position':(10, 260)," + \
                  "'label':'Start',  'toolTip':'Starts Speed Reading' }, " + \
                  "{'type':'Button', 'name':'btnPause', 'position':(110, 260)," + \
                  "'label':'Pause',  'toolTip':'Pauses Speed Reading' }, " + \
                  "{'type':'Button', 'name':'btnClose', 'position':(210, 260), " + \
                  "'label':'Close', 'id':5100 }," + \
                  " ] } "

        # construct the final resource string.
        dlgRSRC = "{'type':'CustomDialog','name':'dlgAutoTextScroller'," + \
                  " 'title':'" + title + "','position':(100,100),'size':(540, 320),\n\n'components': ["
        dlgRSRC += bodyRSRC
        
        # eval the resource string, pass it to Resource() and return it.
        return resource.Resource( eval(dlgRSRC) )




class ChooserDialog(CustomDialog):


Generated by  Doxygen 1.6.0   Back to index