| Reply | « Previous Thread | Next Thread » |
|
Code:
import appuifw
class MyFormView( object ):
## The constructor.
def __init__( self ):
## Bool
self._iIsEdited = False
self._iFields = [( u'Amount1','number', 5 ),
( u'Amount2','number', 5 ),
( u'Amount3','number', 5 ),
( u'Total','number', 5 )]
## Displays the form.
def setActive( self ):
self._iIsEdited = False
self._iForm = appuifw.Form(self._iFields, appuifw.FFormDoubleSpaced)
self._iForm.save_hook = self._markEdited
self._iForm.flags = appuifw.FFormDoubleSpaced
self._iForm.execute( )
def _markEdited( self, aBool ):
self._iIsEdited = aBool
def isEdited( self ):
return self._iIsEdited
def abc(self):
self._iForm[3][2]=self._iForm[0][2]+self._iForm[1][2]+self._iForm[2][2]
if __name__ == "__main__":
appuifw.app.title = u'Try Forms'
myForm = MyFormView( )
myForm.setActive( )
if myForm.isEdited( ):
myForm.abc()
Quote:
IDEAS is all they need but still they think only Genius can give them that. |
| shubhendra |
| View Public Profile |
| Find all posts by shubhendra |
|
hi shubhendra
the below line mentioned by you will definitely give error,Object doesn't support iten assignment self._iForm[3][2]=self._iForm[0][2]+self._iForm[1][2]+self._iForm[2][2] just make one simple change : Total=self._iForm[0][2]+self._iForm[1][2]+self._iForm[2][2] and call this "Total" variable at new form execution. It should work. Regards Girish |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Form troubles | matdodgson | Symbian User Interface | 2 | 2008-12-06 11:49 |
| Displaying Information In a form from Listbox Item | mubx2000 | Symbian User Interface | 26 | 2007-05-26 08:38 |
| Keep track of highlighted ITEM on form | ymtoh | Mobile Java General | 1 | 2005-12-28 01:36 |
| Resizing video in a Form Item | mdtoxy | Mobile Java Media (Graphics & Sounds) | 4 | 2004-04-07 13:11 |
| How to get selected index of Item in a Form ? | akokchai | Mobile Java General | 1 | 2004-02-23 02:40 |