Pahinge naman ng code kong pano gawin nyong kada log-in po masasave xia sa notepad or kada type tapos OK ng user ma sasave xia agad
tapos pano din gawin nyong Background ng python ai Black diba ang default nia White
pwd pa-save din sa notepad nyong code tapos pa upload, para kong naka cp ako pwdng ma copy agad pwd din eh post dito pero pa-save din po sa notepad ah upload din
# May method na ginagamit ang image as background, meron din gumagamit ng mif images na pinagsama-sama in 1 mif gaya ng python uzzap ni sir frost dati, meron din background canvas na basic lang gaya nito sa example natin sa baba,
# imports here
Code:
import appuifw as a, e32, os
# screen size
Code:
a.app.screen = 'full'
# our function to draw black
Code:
def black_bg():
def redraw(rect):
# start black background
cc.clear(0x0000000)
# end black background
# start of text
cc.text((20, 25), u'Putsa Test Canvas', 0xccccccc, font = 'legend')
cc.text((20, 50), u'Black', 0xccccccc, font = 'legend')
cc.text((20, 75), u'Click options', 0xccccccc, font = 'legend')
# end of text
# body of our canvas
cc=a.Canvas(event_callback=None, redraw_callback=redraw)
a.app.body=cc
Code:
# our function to draw green
def green_bg():
def redraw(rect):
# start green background
cc.clear(34816)
# end green background
# start of text
cc.text((20, 25), u'Putsa Test Canvas', 0xccccccc, font = 'legend')
cc.text((20, 50), u'Green', 0xccccccc, font = 'legend')
cc.text((20, 75), u'Click options', 0xccccccc, font = 'legend')
# end of text
# body of our canvas
cc=a.Canvas(event_callback=None, redraw_callback=redraw)
a.app.body=cc
# declare the define function black as our first function
Code:
black_bg()
# exit here
Code:
def exit():
os.abort()
# menu here
Code:
a.app.menu=[(u'Turn to green', green_bg), (u'Turn to black', black_bg), (u'exit', exit)]
a.app.exit_key_handler=exit
e32.Ao_lock().wait()
Links last checked by PXK - DLink Checker v2 at 09/24/2012 2:21:36 PM
0/1/0/0/1 4.59077310562
The Following User Says Thank You to sanora For This Useful Post:
thank you ng marami pwd pahinge dn ng ibat ibang font color sa python
Ito pa diba pag typeq dun naka deafult xia sa txt pwd no. Nalang d kuna pipindutin nyong no.sign gustoq diretso nalang xia sa no.sapag typeq sana na gets mo
Replace the word 'text' with 'number' and add in the next line a string to prevent a query error of coercing the typed number into unicode
It would be like this:
Code:
Docu_1=a.query(u'Enter a number', 'number')
Docu_1=str(Docu_1)
The whole def save_docu2() would be written like this
About sa multi_query, yung dalawang textbox ang pagtatypan mo, hindi ko alam if meron direct type ng number. Yung single query lang ang alam kong meron.
Note:
Do not save a py script in unicode. Just click 'Save'. Not 'Save as unicode'
Additional: try this if you want.
Typing directly from the body of a py script.
Links last checked by PXK - DLink Checker v2 at 09/24/2012 2:40:37 PM
0/1/0/0/1 4.63519096375
The Following User Says Thank You to sanora For This Useful Post:
idol dq makuha nyong naka number agad xia imbest txt ang eh ttype ng user gustoq kasi naka default xia sa no.
Pwd dn ba mga 20characters lang ang eh type ng user? kung baga nasa 32+characters ata ang pwdng eh type ng user , pwd 20lang? tapos hangang d umaabot sa 20Characters ang nilalagay ng user d xia pwdng eh OK? kong baga walang maglalagay na option na pwd nang eh ok
Sorry kong magulo at demanding kaylangan lang talaga idol