Hi Experts,
I have form in which there are some textboxes and a dropdown list. and i have a option menu to take photo.
Here is a part of my code which create a form, textbox, dropdown and a menu for camera
When i press Options>>Camera, the form only is displaying. when i press back, i can see the camera. That means the camera is coming in background.Code:stations = [u"Select" , u"Station 1", u"Station 2", u"Station 3", u"Station 4", u"Station 5"] #Create the fields to be displayed in the form fields = [(u"Location", 'text'), (u"Station", 'combo', (stations, 0)), (u"Comments",'text'), (u"User Id", 'number')] #Create an instance of Form myForm = appuifw.Form(fields, flags=appuifw.FFormEditModeOnly) myForm.menu = [(u"Camera",initcamera)] #Assign the save function #Execute the form myForm.execute() def initcamera(): appuifw.app.body = appuifw.Canvas() camera.start_finder(vf) appuifw.app.menu=[(u"Take photo", take_picture),(u"back",backtomain)] def backtomain(): #Close the viewfinder camera.stop_finder() #Release the camera so that other programs can use it camera.release() #Function for displaying the viewfinder def vf(im): appuifw.app.body.blit(im) #Function for taking the picture
How to make it come in Foreground????
And after taking pic, i want to come back to the form.
How these things can be done???????
Thanks in advance,
Rabeeh

Reply With Quote

