Re: Focus Problem
- Posted by doncole2009 Apr 18, 2009
- 901 views
Thanks Mike and Chris,
I finally figured it out.
This will jump down each row and focus it if something is inside.
No other EditTexts BLINK. My main problem before.
Also it will jump back to the top if it hits bottom.
Code if anybody is interested:
constant pPriceET={EditText1,EditText2,EditText3} constant pTotET={EditText4,EditText5,EditText6} procedure on_key_down(integer self, integer event, sequence params) integer a,b if params[1]=13 then a=find(getFocus(),pPriceET) if a=length(pPriceET) then--turn around if needed a=0 end if while 1 do--before set focus be sure is not empty b= check_price_entry(pPriceET[a+1])--this checks if empty or not if b then --not empty doEvents(0) setFocus(pPriceET[a+1]) exit else --yes empty go on to next one a+=1 if a=length(pPriceET) then--turn around if needed a=0 end if end if end while end if end procedure setHandler(pPriceET,w32HKeyDown,routine_id("on_key_down"))
Don Cole A Bug is an un-documented feature. A Feature is a documented Bug.