> 2. the following code works just fine until my program gets complicated >and then it does not show the edit field nor the inserted text unless I >physically refresh the screen by clicking outside of the window and back, >etc so does anynone know how to get the inserted text to display? > > fieldID%=1: startPos%=36000: endPos%=36000 > teH& = TEHANDLE(fieldID%) 'get field handle > FOR count = 1 TO 6 > strPtr& = VARPTR(var$(count)) > LONG IF teH& 'is handle valid, then continue > strLen% = PEEK(strPtr&) 'get string length for insertion > CALL TESETSELECT (startPos%, endPos%, teH&)'set selection in field > CALL TEINSERT (strPtr& + 1, strLen%, teH&) 'insert text into field > CALL INVALRECT (teH&..viewRect%) 'force fb to update field > END IF > NEXT count > > TIA, Stephen > I've run into this a lot, too. There was something else I had to do to get it to update. Unfortunately I don't remember what it is/was. CALL INVALRECT adds that area to the refresh region (I think), but that doesn't get drawn until the window recieves an update event. Thing is, I always thought (and still think...) that invalrect would cause the update if the app got the time. In otherwords, while invalrect won't directly cause an update, the app should get the wndupdate event soon after because it gets the time to do so. Sigh, I'm probably being more confusing then helpful 'cause I'm getting tired. HTH some, *Chris